Results 1 to 3 of 3

Thread: Combining strings in PHP ? [Resolved]

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    At my computer
    Posts
    187

    Resolved Combining strings in PHP ? [Resolved]

    I don't know a whole lot about PHP... what I'm doing is taking the argument passed to a site name like this:

    http://www.mysite.com/main.php?page=pics

    ...and have it read two .htm files on the server and display one on the left and one on the right. If the agument passed is nothing (http://www.mysite.com/main.php), then it loads homer.htm and homel.htm

    PHP Code:
    generatetop();

    $page=$_GET['page'];

    if(
    $page=="")
    {
    echopage("homel");
    }
    else
    {
    echopage($page "l");
    }

    generatemiddle();

    if(
    $page=="")
    {
    echopage("homer");
    }
    else
    {
    echopage($page "r");
    }

    generatebottom(); 
    I don't know PHP very well, but that only works when I go to (http://www.mysite.com/main.php) ... If I set page equal to something, it crashes. Is + not the right thing to use to combine strings in PHP ? I think it's sending 0 to the echopage function.

    Warning: fopen("0.htm", "r") - No such file or directory in /usr7/home/spadeapp/public_html/xchange/main.php on line 49

    Any ideas ?
    Last edited by Allen Schoessler; Jul 29th, 2005 at 02:45 PM.
    - Visual Basic 6.0
    - Windows XP Home

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width