Making The Popular Id Browsing For Your Site.

Pages: 1, 2
free web hosting
Open Discussion > CONTRIBUTE > Tutorials

Making The Popular Id Browsing For Your Site.

Imtay22
Hello Friiks, again I have a question about this syntax. I have multiple lines of code i would like to put in the
CODE
echo 'This is page two';
part of the code. When i try to have line breaks, it comes up with-
QUOTE
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/imtay22/public_html/runescape/news.php on line 16
Help?!

Reply

friiks
CODE
echo 'This<br>is<br>a<br>linebreaked<br>text<br>w00t';
[code]
or
you can use echo like this...
[code]
echo <<<END
Your long linebreaked etc. text here
END;

Im too tired and sleepy to explain so just google echo php and look for php.net ..

Reply

jlhaslip
Anyone reading this Thread might also be interested in this reply to a question about implementing Friik's code by another member.
Actually it is the same question as Imtay posted...

Reply

matak
After a while struggling with PHP arrays in order to build even more dynamic, more like administrator friendly dynamic links i figured out it could be done this way. First we need to build ourselves an associative array like this

CODE
$glavni_linkovi = array(
            "Index" => "This is the index file!",
            "Link1" => "This is path to link1!!",
            "Link2" => "This is path to link2!!",
            "Link3" => "This is path to link3!! :)"
        );


After we made our array with foreach statement we can make our links. I made it something like this

CODE
foreach ($glavni_linkovi as $gl_li => $gl_li_path) {
    echo '<a href="?p='.$gl_li_path.'">'.$gl_li.'</a> ';
}


Now we go to the part where we use $_GET like posted above to use that associative array in our page. Code looks a bit messy but it's couse i didn't know any other way to use Default switch with foreach statement.. Here's the code

CODE
$page = $_GET['p'];
if ($page == "") {
    echo $glavni_linkovi['Index'];
}
else {
foreach ($glavni_linkovi as $gl_li => $gl_li_path) {
switch($page) {
    case $gl_li_path:
    echo $gl_li_path;
    break;
}
}
}


This can be quite handy beacouse we don't need to write switch statement every time when we create link. Also we don't need to write links manualy, beacouse they are created automaticly when added to associative array..
Hope u Like this example. Here's how it works. Link. And here's the download zippy if you don't understand how to implement it in webpage..Zippy smile.gif

Thanks to all trap17 coders!
matak

 

 

 


Reply

jlhaslip
Nice code, but use the following query string to see what happens.
CODE
p=test

You need to find a way to always end up at the index.php page, otherwise the client gets a header with no "page" content.
Also, move the array outside the page code to a text file so the entire page doesn't need to be editted, only the text file. Makes it a bit more user friendly. ( and safer to update the link array without damaging the page ) smile.gif
Keep trying.

http://www.trap17.com/forums/templating-sy...des-t35271.html
(I'll send the zip if you want. I took it off the net due to a small (potential) security problem)

Reply

reconraiders
A while back I used something like this but for some reason the links were getting messed up. Whenever I would click a link with parameters in it (?page=2&action=view) from a page that already had parameters in the url, it would add the parameters to the page. I would end up going to a url "index.php?page=1&action=add?page=2&action=view". I didn't understand why. Is there a setting in php to adjust to fix this?

Reply

jlhaslip
reconraiders,

post your source code in a new thread, please.

Chances are that you are adding the new query string onto the end of the existing, instead of clearing the old query string first.

Reply

Mariana
Yay, that was very helpful..

Thanks =3

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2
Similar Topics

Keywords : making, popular, id, browsing, site,

  1. [aef] Most Recent Topics Listing Mod
    on your Web-site pages (2)
  2. Making Calculators with PHP
    Some basic calculator scripts I made. (4)
    Yes, I made some basic calculators to use for simple math problems, nothing big. I'm a newbie at
    php, so if I made something that could be short, long, I am sorry. lol Here is one for adding two
    numbers. CODE <html> <title>Adding 2 numbers </title> <body>
    <h3 align="center">Type in the two numbers you'd like to add
    together.</h3> <form action="add2.php" method="post"> <input
    type="text" name="number1" /><p>+</p> <input type="tex....
  3. How To Make An Ultimate Game List.
    If you're making a site on video games or such. (0)
    Hello. I am BuBBaG. You can call me Bubba for short. I'm going to show you how to make an
    Ultimate Game List. First off, we need to make a database, we are going to call this database
    `my_db`, leave out the `'s. Inside that database we will need to create a table
    called `ugl'(Ultimate Game List, duh). To make the table, simply enter this in the Syntax.
    CODE CREATE TABLE ugl ( System char(50), Game char(50), ) In the
    above code, it is stating we are creating a table called ugl, with two columns, System, and Gam....
  4. Simple Stylesheet Tutorial
    Stylesheet embedded in your site. (2)
    Hi - ill show you how to make a simple style sheet that will be embedded into your site. OK make
    sure your site is set up already (like the standard tags) To start and end off a stylesheet you
    need to do the following CODE <style type="text/css"> </stlye> Ok
    lets start CODE <style type="text/css"> p { font-family: "Tahoma";
    font-size: 9; color: "red"; } </style> So when you come to put in
    CODE <p>Hi!</p> The text will appear red and will be in Tahom....
  5. Ftp In Visual Basic 6.0
    Start making your FTP client using VB6 (1)
    Recently, I had a need to make a FTP client, since our webhosting FTP server was kind of exotic, and
    very restrictive, and most of uploads, even though they reach 100% would crash... File would be
    uploaded to a server, but FTP clients just froze upon completion, waiting for the 226 (OK) from FTP
    server... So, I had to make my own, one who would not wait for 226, but instead, watch the file
    pload progress... This tutorial is not fuly complete, in the sense that it does not offer COMPLETE
    FTP client functionality (for example, I ddn't write the code for FTP download, ....
  6. Making A Song In Fruity Loops Part Three
    part three precusion (1)
    ok part three now which covers the precusions setup of the small song i built for this tutorial.
    the nesecery files can be downloaded here the image below is included in the precusions folder as
    it mught not be entierly visable within this post so shold you need it its there also the images
    purpose is to enable you to see what i am refering to within this tutorial lateron. now what i
    have done above is blackd out every pattern that has nothing to do with the precusion. so the
    patterns displayed in light grey are the only patterns i will be refering to. ok lets b....
  7. Making A Song In Fruity Loops Part 2
    part 2 the second melody (0)
    ok i am going to attach the midi file againe incase you didnt get it from the first part in this
    part i will demonstright how to create and insert the second mellody ok so you have your first
    mellody wich is ecetially the comein chord as i call it. now open the midi file you put in your left
    panel during the first tutorial and drag the mellody 2 © onto the pallet but click on pattern two
    in the right site playlist box. now like in the first tutorial replace with sytrus. for this type
    of mellody use something in the leads section of the plugin.for this you need to ....
  8. How To Set Up A Bookmarking System On Wii
    Use your favorite social bookmarking site. (0)
    This is a simple tutorial on a way to set up a bookmarking system on your Wii with greater stroage
    than the Favorites. It is more complicated than the Favorites and requires manual URL typing. Well
    let's dive on in. Items Required Nintendo Wii Internet Channel 3 Empty Favorites Internet
    Connection An account on a social bookmarking site I will be using delicious as an example.
    delicious Ok, if you do not have an account, read on. If you do have an account, go to the
    {account} section. Ok, first you need to register an account. This can be done by clicki....
  9. Create A Google Seach Result Page Embed Within Your Site Page.
    (12)
    Create a google seach result page embed within your site page. It is easier to create
    web page that embeded the google search result in it. The first step is to go to google apply an
    account for the google ad-sense. After that login to you account and choose the create ad-seach
    option. Most of time the google search box give all we have the great and powerfull seach ability.
    But, have you think every time users get seach with it. They do redirected to another page that is
    not within you site. It is easier to create web page that embeded the google sea....
  10. Php Word Filter
    Have you accidently sworn on your site? Or do you want to keep visitor (9)
    This is pretty simple but very useful if you don't want people to swear. We will be using
    str_replace for this. CODE <?php str_replace ("curseword,
    "replacemet"); ?> Thats pretty simple, just fill in the curse word and the
    replacement, and then repeat... heres what it would look like full size: CODE <?php
    str_replace("swear", "replacement"); str_replace("swear",
    "replacement"); str_replace("swear", "replacement");
    str_replace("swear", "....
  11. Creating A Resume
    10 Tips For Making A Resume (1)
    I've been working on my Resume for months now. Here is a summary of what I've learned: 1.
    Avoid referring to yourself via 1st person or 3rd person terms. Rather than saying "I started this
    job in" just say "Began job in"... Employers expect Resumes to be professional and avoid reference
    to oneself; and instead speaking in an impersonal tone that presents
    achievements/skills/experience/education without personalization. Avoid words like "I", "my", "he",
    "she", etc. Leave out personal pronouns and only use the action words/verbs. This also includes
    your Ob....
  12. Faux Ajax Loading - Css Only
    Pretend your site is Ajax based (3)
    Link: http://www.jlhaslip.trap17.com/samples/misc/ajax/index.html Check that out. The first page
    has information and the second and has the actual example of its use with sample CSS code. I find
    that when you visit a site which has a slow server and attempt to view 'large' Image files,
    it is pretty boring to sit and stare at a blank screen, so this little snippet of code can be used
    to give the visitor something to see to indicate that the image is being downloaded. I built a
    small animated gif that sits in the background of the space allocated for the image....
  13. Making A One Page Does All Website In Phph
    (2)
    Hello and Great Day or Night either one. Have you ever been to a site and seen a index page or any
    page at all control everything such as index.php?do=home&action=logout something similar to the
    above? Well I am going to show you how easy it is to make this all own your own, and only have to
    use one web template or design to make it work. Before we get started you need to go ahead and find
    the web design that you want to use. After you find the site you want to use go ahead and save
    it... and save it like this so we can work together, ok! Note* We are going to ....
  14. Making a java based program
    (3)
    Java GUI Making a Little Java Program Sec. 1: Imports and starting it off Sec. 2: Variables Sec.
    3: Frame and Stuff Sec. 4: Declaring buttons Sec. 5: Adding buttons Sec. 6: Action Listening Sec. 7:
    Using this for a learning experience Section 1 Now, let's think. What imports do we need? We
    obviously need GUI imports. We also need the action Listener. So, let's declare this at the very
    top: Code: CODE import java.awt.*; import java.awt.event.*; import javax.swing.*; That's
    all we need to get all our supplies. Now to start us off. Skip a couple lines ....
  15. Cpanel Useful Site Management Tools 2.1
    Part 3 of My 7 Part Tutorial (0)
    This Tutorial will be divided into 7 different parts, and this is the first part, when i get the
    other parts together, i will post the links under here /biggrin.gif" style="vertical-align:middle"
    emoid=":D" border="0" alt="biggrin.gif" /> Enjoy. Part 1: E-mail Management Part 2: Useful Site
    Management Tools Part 4: Analysis/Log Files Part 5: Advanced Tools Part 6: PreInstalled
    Scripts, Extras, and Cpanel Options Part 7: Fantastico Detailed Cpanel Tutorial Part 2.1:
    Useful Site Management Tools In this tutorial I will, in detail explain all of th....
  16. Cpanel Useful Site Management Tools
    Part 2 of My 7 Part Tutorial (0)
    This Tutorial will be divided into 7 different parts, and this is the first part, when i get the
    other parts together, i will post the links under here /biggrin.gif" style="vertical-align:middle"
    emoid=":D" border="0" alt="biggrin.gif" /> Enjoy. Part 1: E-mail Management Part 3: Useful Site
    Management Tools2.1 Part 4: Analysis/Log Files Part 5: Advanced Tools Part 6: PreInstalled
    Scripts, Extras, and Cpanel Options Part 7: Fantastico Detailed Cpanel Tutorial Part 2:
    Useful Site Management Tools In this tutorial I will, in detail explain all of t....
  17. Making A Dynamic Page On Blogspot
    Using an external server to make your pages hosted on blogspot dynamic (5)
    Good morning everyone. Have you ever wondered how to allow your visitors to edit content on your
    blog? Like adding a post straight off the page, adding a link, editing your profile etc. This will
    be extremely useful if you want your visitors to contribute to your blog besides writing comments or
    tagging. 1. Adding a post straight off the page. Go to blogger.com, login, select your blog. Go to
    settings -> email. By enabling blog email, you can now add a post by simply sending an email to the
    address you specified. The address should look something like: yourusername....
  18. Making Interactive Cds With Flash
    My second flash tutorial for Beginners (2)
    Im back again with what i think it would be an interesting tutorial for all of you guys who wants to
    take flash out of the web and make really cool interactive CDS. First of all if all of you are
    thinking right now: "this dude is wrong for making interactive cds you have to use macromedia
    Director", well you are right macromedia director it's used to build interactive cds and dvds
    among other things, but you can also make interactive cds with Flash, the thing is: if you want to
    make a simple interactive CD you can totally do it with flash, of course Director brings ....
  19. Templating System Using Php Includes
    Building a Dynamic site using Includes and flat-files. (13)
    Php based Templating System http://jlhaslip.trap17.com/template/index.php The Source Code
    for the scripts are included (literally) on the different pages on the Demo, including the Contact /
    Email script. The only page not there yet is the Message Script. Maybe tonight I will upload that.
    This one uses a little bit of query-string checking to confirm that the contents of the page are
    actually available (file_exists())and an allowed page content before serving it up. The
    'allowed page content' is done by checking against a flat-file containing an array....
  20. How To: Make A Simple Php Site
    Making one file show up on all pages using php (21)
    I have looked all over the site and could not find anything that was like this simple, or just like
    this at all.. For some people i know that you are using a basic HTML site...and having a big menu
    if you want to add somthing you have to go into every one of the pages and add or remove or edit
    what you want to do, but with somthing verry simple all you would have to do is edit one file, and
    all of the pages that have the PHP script on them would suddenly change to what that one file is.
    So to start off if you are planning on using this little tirck, the page that you a....
  21. Phpbb Forum Site Transfer
    How to do it, step by step instructions (20)
    I'm sure many of you out there have used phpBB at some point. To those who enjoy running forums
    and online communities, specifically supporting phpBB, I am about to tell everyone how to restore
    the forums database from one website, to another. This is presuming you do not have any mods or
    hacks installed. Some of you may find this information useful. Here is the scenario: Let's say
    you have forums running phpBB version 2.0.17 (currently the latest one). You have decided that you
    want to move your forums to a whole new URL and provider, and as an added bonus, ch....
  22. Making Winrar Archives
    and adding password to winrar archives (13)
    **** This tutorial will show you how to put files into .rar Archive and pass worded (if wanted)
    **** What You Will Need Before continuing you will need a couple of thing, first of all you
    need WINRAR , which is a very powerful archive manager. It can reduce size for you email
    attachments, decompress RAR, ZIP and other types of files downloaded from the internet. You can get
    winrar at http://www.rarlabs.com The other thing is that make sure your using Windows XP because
    this is what I used to make this tutorial. I think it works with any other windows not....
  23. Tutorial: Installing D-shoutbox For Ipb V1.2
    Making your installation even easier (12)
    Over the course of the summer I have tried hard to install a shoutbox into a new forum I was
    developing. I went to the Invisionalize forums and found several mods for shoutboxes, but none of
    them seemed to work. I first tried to install the D-Shoutbox, but upon this first try, I was
    unsuccessful. Eventually, after much frustration, and trying other mods, which didn't seem to
    stack up to Dean's features, I was determined to make it work. For some, editing your files (to
    the newbie that is) can be difficult, with everything looking like a foreign language (basi....
  24. Css And Javascript Combined For Dynamic Layout
    use of different CSS files at same site (9)
    This tutorial is meant for people that are dealing with problems while coding their site at 100% of
    width. Important notice: Some people has JavaScript disabled, so they will not be able to load CSS
    file (take this in account when creating your website). How this script works. In the HEAD of your
    HTML document will apply this command, so variable.js file will be load at start: CODE
    <script type="text/javascript" src="variable.js"></script> In
    browser JavaScript file variable.js is loaded. This Javascript file consist of this para....
  25. How To Make A Very Simple Wap Site
    A quick tutorial about WML language (40)
    WAP Site Tutorial : How to Make A Wap site? Before We begin.. Defination from the
    Web about Wap. QUOTE WAP is an open international standard for applications that use
    wireless communication . Its principal application is to enable access to the Internet from a
    mobile phone or PDA .A WAP browser provides all of the basic services of a computer based web
    browser but simplified to operate within the restrictions of a mobile phone. WAP is now the
    protocol used for the majority of the world's mobile internet sites, known as WAP sites ....
  26. Checking The Web Site Speed
    (10)
    Did you taking too much time to access your favorite sites? Probably the problem is on the server
    used by those sites. To make sure that is the problem, use Windows PING facility. Ping is a small
    program, which sends a 32-bit signal to the Web site server. Next, Ping record the time needed by
    the server to answer it. To activate Ping: Click on the Start-Run menus, type command, and then
    click OK. Type PING "site name" in the MS-DOS prompt window, for example PING www.yahoo.com. In a
    moment, the result will appear on the screen. A result less than 300ms is normal spee....
  27. How To Put A Phpbb Login Box On Your Main Site.
    Code and .php included!!! (18)
    I have included my coded file with this... Ok here is the code. CODE // //Create login area,
    replace the phpBB2 in /phpBB2/login.php with your forum's //directory // <form
    action="/phpBB2/login.php" method="post" target="_top"> <table
    width="25%" cellspacing="2" cellpadding="2" border="0"
    align="center">  <tr> <td align="left"
    class="nav"><a href="/phpBB2/index.php" class="nav">Prank Place
    Forum Index</a></td>....
  28. HTML tags and examples
    Condensed form of course from my site... (37)
    Well, I decided to try and help out some of the users here who might be unexperienced in HTML, so I
    condensed the begginer's HTML course at my website. Here it is... Lesson 1 HTML means Hyper
    Text Markup Language. HTML is a very common language used for many websites, is the base for more
    complicated and powerful langauges like php, HTML can seem hard, but you will find it is one of the
    easiest langauges one can learn. The core of HTML is the tag, a tage is just a set of two
    arrows-like brackets created by hitting Shift and the comma key, or Shift and the period....
  29. Php Quiz Script
    Make quizzes for your site. (20)
    Hello all, A little bit back I decided to make a quiz scriptjust out of no where lol. However it
    doesnt do anything special but I am going to make an email mod for it so that it will email results
    to your email address. So here is the basis of it. INSTRUCTIONS: Open a new page in your text
    editor and paste in the following code. CODE <?php $qid = "Quiz ID-00"; ?>
    <html> <head> <title><? echo "Gamers Pub $qid";
    ?></title> </head> <body> <p><h3><? echo "....
  30. Php Emailer/contact System
    An email or contact system for your site (20)
    Hello all, Here is an easy Emailer or Contact system that allows visitors or members of your site
    to email you just by filling out a form. So here is what you need to do to set it up. First open up
    a new page in your text editor and paste in the following code. CODE <?php $Name =
    $_POST['Name']; $Subject = $_POST['Subject'];
    $Email = $_POST['Email']; $Site =
    $_POST['Site']; $Message=$_POST['Message'];
    $align = $_POST[&#....

    1. Looking for making, popular, id, browsing, site,

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for making, popular, id, browsing, site,

*MORE FROM TRAP17.COM*
Similar
[aef] Most Recent Topics Listing Mod - on your Web-site pages
Making Calculators with PHP - Some basic calculator scripts I made.
How To Make An Ultimate Game List. - If you're making a site on video games or such.
Simple Stylesheet Tutorial - Stylesheet embedded in your site.
Ftp In Visual Basic 6.0 - Start making your FTP client using VB6
Making A Song In Fruity Loops Part Three - part three precusion
Making A Song In Fruity Loops Part 2 - part 2 the second melody
How To Set Up A Bookmarking System On Wii - Use your favorite social bookmarking site.
Create A Google Seach Result Page Embed Within Your Site Page.
Php Word Filter - Have you accidently sworn on your site? Or do you want to keep visitor
Creating A Resume - 10 Tips For Making A Resume
Faux Ajax Loading - Css Only - Pretend your site is Ajax based
Making A One Page Does All Website In Phph
Making a java based program
Cpanel Useful Site Management Tools 2.1 - Part 3 of My 7 Part Tutorial
Cpanel Useful Site Management Tools - Part 2 of My 7 Part Tutorial
Making A Dynamic Page On Blogspot - Using an external server to make your pages hosted on blogspot dynamic
Making Interactive Cds With Flash - My second flash tutorial for Beginners
Templating System Using Php Includes - Building a Dynamic site using Includes and flat-files.
How To: Make A Simple Php Site - Making one file show up on all pages using php
Phpbb Forum Site Transfer - How to do it, step by step instructions
Making Winrar Archives - and adding password to winrar archives
Tutorial: Installing D-shoutbox For Ipb V1.2 - Making your installation even easier
Css And Javascript Combined For Dynamic Layout - use of different CSS files at same site
How To Make A Very Simple Wap Site - A quick tutorial about WML language
Checking The Web Site Speed
How To Put A Phpbb Login Box On Your Main Site. - Code and .php included!!!
HTML tags and examples - Condensed form of course from my site...
Php Quiz Script - Make quizzes for your site.
Php Emailer/contact System - An email or contact system for your site
advertisement



Making The Popular Id Browsing For Your Site.



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE