Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Nov 2006
    Posts
    601
    Thanks
    1
    Thanked 2 Times in 2 Posts

    using $_get will not work need help

    hey guys i wanna use

    Code:
    PHP Code:
    <?
    $user2 
    =  $_GET['username'];
    echo 
    $user2;
    if (
    $usemysql == 1)
      {
        
    /* Load the tagboard, the X number of most recent posts */
        
    if ($order == "0")
        
          
    $SQL "SELECT * FROM $tablname WHERE account = '$user2' ORDER BY -id LIMIT $howmany";

    to just get the profiles shoutbox posts...

    but i use my index.php witch is included on my profiles page... so on profile.php i have include 'tagbox/index.php'which is this 
    Code
    :

    <?

    require (
    "required.php");
     
    $user1 $_GET['username'];
    echo 
    "<HTML>\n";
    echo 
    "  <HEAD>\n";
    echo 
    "    <LINK rel=\"stylesheet\" type=\"text/css\" href=\"shoutbox/tagboard.css\">\n";
    echo 
    "  </HEAD>\n";
    echo 
    "  <BODY bgcolor=\"#EEEEEE\">\n";
    echo 
    "    <FORM action=\"shoutbox/post.php\" method=\"POST\" target=\"tagboard\" name=\"post\" id=\"post\">\n";

    echo 
    "<input type=hidden name=username value='$user1'>";
    echo 
    "      <TABLE cellpadding=\"0\" cellspacing=\"2\" width=\"1%\">\n";
    echo 
    "        <TR>\n";
    echo 
    "          <TD>\n";
    echo 
    "            <IFRAME src=\"shoutbox/tagboard.php?username=$user1\" width=\"100%\" height=\"200\" frameborder=\"0\" scrolling=\"auto\" name=\"tagboard\"></IFRAME>\n";
    echo 
    "          </TD>\n";
    echo 
    "        </TR>\n";
    echo 
    "        <TR>\n";
    echo 
    "          <TD align=\"center\">\n";
    echo 
    "            <INPUT type=\"text\" name=\"message\" size=\"25\" value=\"message\" maxlength=\"$messagelength\">\n";
    echo 
    "          </TD>\n";
    echo 
    "        </TR>\n";
    echo 
    "        <TR>\n";
    echo 
    "          <TD align=\"center\">\n";
    echo 
    "            <INPUT type=\"submit\" value=\"Tag It!\" name=\"submit\">\n";

    if (
    $emoticon=="1")
      echo 
    "            <BR>[ <A href=\"shoutbox/emoticons.php\">Emoticon Help</A> ]\n";

    echo 
    "          </TD>\n";
    echo 
    "        </TR>\n";
    echo 
    "      </TABLE>\n";
    echo 
    "    </FORM>\n";
    echo 
    "  </BODY>\n";
    echo 
    "</HTML>\n";

    ?>
    as you can see this link echo " <IFRAME src=\"shoutbox/tagboard.php?username=$user1\" width=\"100%\" height=\"200\" frameborder=\"0\" scrolling=\"auto\" name=\"tagboard\"></IFRAME>\n"; shows tagboard in an iframe... which in turn is really a different webpage so when i come to tagboard.php

    Code:

    PHP Code:
    require ("required.php");

    echo 
    "<!-- $scriptname v$version Start -->\n\n";
    echo 
    "<HTML>\n";
    echo 
    "  <HEAD>\n";
    echo 
    "    <LINK rel=\"stylesheet\" type=\"text/css\" href=\"shoutbox/tagboard.css\">\n";
    echo 
    "  </HEAD>\n";
    echo 
    "  <BODY topmargin=\"2\" leftmargin=\"2\" bottommargin=\"2\" rightmargin=\"2\">\n";
    $user2 =  $_GET['username'];
    echo 
    $user2;
    if (
    $usemysql == 1)
      {
        
    /* Load the tagboard, the X number of most recent posts */
        
    if ($order == "0")
        
          
    $SQL "SELECT * FROM $tablname WHERE account = '$user2' ORDER BY -id LIMIT $howmany";
        else
          
    $SQL "SELECT * FROM $tablname WHERE account = '$user2' ORDER BY id LIMIT $howmany";

        
    $results mysql_db_query($database"$SQL"$connection);
        if (!
    $results)
          return (
    "ERROR: " mysql_error() . "\n$SQL\n");
        
        while (
    $row mysql_fetch_array($results))
          { 
            
    $nick     $row["nick"]; 
            
    $url      $row["url"];
            
    $message  $row["message"];
            
    $datetime $row["datetime"]; 
    i need to some how show $SQL = "SELECT * FROM $tablname WHERE account = '$user2' ORDER BY id LIMIT $howmany"; this... i tried my attempt but it does not seem to be working and i thought it was the way to go...any suggestions...

    i hope i have been clear

  • #2
    Regular Coder
    Join Date
    Nov 2006
    Posts
    601
    Thanks
    1
    Thanked 2 Times in 2 Posts
    ahhh ok i found the problem... what i was not doing was when the data had been entred... i needed to refresh the page with the username link in the refresh link :P


  •  

    Posting Permissions

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