Jump to content


Photo

Wrong Interpreter


  • Please log in to reply
1 reply to this topic

#1 gimmefaith

gimmefaith
  • New Members
  • Pip
  • Newbie
  • 1 posts
  • LocationNetherlands

Posted 07 October 2003 - 02:47 PM

Hi,

I have installed Apache, PHP and MySQL. I seams to work good, but there is a really strange thing going on. When i make a link like:

<? echo \"<a href=\'$php_self?inhoud=4\'>Werk Ervaring</a>\"; ?>

I want to use a link to change my variable $inhoud using a query string. But the $inhoud would not change in another value. When I use another webserver (from my site) it will work very good. I will show you the code of what i have did:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
</head>

<body bgcolor=\"#CCCCCC\">
<div align=\"right\"></div>
<table width=\"760\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFCC\">
<tr>
<td width=\"18%\"><div align=\"center\"><font color=\"#000000\" size=\"-2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><? echo \"<a href=\'$php_self?inhoud=3\'>Opleidingen</a>\"; ?></font></div></td>
<td width=\"18%\"><div align=\"center\"><font color=\"#000000\" size=\"-2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><? echo \"<a href=\'$php_self?inhoud=4\'>Werk Ervaring</a>\"; ?></font></div></td>
<td width=\"18%\"><div align=\"center\"><font color=\"#000000\" size=\"-2\" face=\"Verdana, Arial, Helvetica, sans-serif\">Kennis</font></div></td>
<td width=\"15%\"><div align=\"center\"><font color=\"#000000\" size=\"-2\" face=\"Verdana, Arial, Helvetica, sans-serif\">Portfolio</font></div></td>
<td width=\"16%\"><div align=\"center\"><font color=\"#000000\" size=\"-2\" face=\"Verdana, Arial, Helvetica, sans-serif\">Interesse</font></div></td>
<td width=\"15%\"><div align=\"center\"><font color=\"#000000\" size=\"-2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><? echo \"<a href=\'$php_self?inhoud=1\'>Begin</a>\"; ?></font></div></td>
</tr>
</table><br>
<hr width=\"90%\"><br>
<table width=\"760\" height=\"282\" border=\"0\" align=\"center\" bgcolor=\"#FFFFFF\">
<tr>
<td height=\"278\"><table width=\"700\" height=\"221\" border=\"0\" align=\"center\">
<tr>
<td width=\"36%\" height=\"217\"><div align=\"center\"><img src=\"images/alex.jpg\" width=\"217\" height=\"202\"></div></td>
<td width=\"64%\" bgcolor=\"#FFFFCC\">

<?php
if ($inhoud==\"\") $inhoud=1;

include \"./connection.inc\";
$link_id = db_connect(\'pop\');
$result = mysql_query(\"SELECT * FROM content WHERE id=$inhoud\", $link_id);

while($query_data = mysql_fetch_row($result)) {
echo \"$query_data[1]\";
}
?>

</td>
</tr>
</table></td>
</tr>
</table>
<p align=\"center\">&nbsp;</p>
</body>
</html>

Please help me!!!

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 07 October 2003 - 03:41 PM

on the receiving page try using $_GET[\'inhoud\']. this is a register_globals issue, unless i have misunderstood you.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users