Forums
This topic is locked
URL Parameter not working after update
Posted 21 Jun 2005 18:13:12
1
has voted
21 Jun 2005 18:13:12 Matt Weghorst posted:
Hey everyone,First of all I want to thank the web development gods for forums like these. You guys are great.
I am having some trouble with a php/mySQL update server behavior in Dreamweaver MX 2004. The updating part of the script works fine. However, I want to display the data that has just been updated using a url parameter. I went through the dreamweaver way of doing url parameters and it wrote this code for the link/parameter.
<pre id=code><font face=courier size=2 id=code> $updateGoTo = "profile.view.php?user_info_id=" . $row_profile['user_info_id'] . "";</font id=code></pre id=code>
It looks fine to me, but when I test it it sends me to "profile.view.php?user_info_id=&" which returns a syntax error as follows.
"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
If I manually type the parameter the way it should be it works fine.
Next I tried it these ways, but they all did the same thing.
<pre id=code><font face=courier size=2 id=code>
$updateGoTo = "profile.view.php?user_info_id={$row_profile['user_info_id']}";
$updateGoTo = "profile.view.php?user_info_id={$_GET['user_info_id']}";
</font id=code></pre id=code>
It didn't work when I used a different field either.
I have never had problems with url parameters before, however this is the first time I have coded a url parameter within a larger set of php tags.
Some help would be much appreciated!
Thanks, Matt