...

View Full Version : using $_get will not work need help



runnerjp
05-16-2008, 06:57 PM
hey guys i wanna use

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:


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 :)

runnerjp
05-16-2008, 07:12 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum