General discussions related to php
Moderators: macek, egami, gesf
- New php-forum User
- Posts: 7
- Joined: Fri May 17, 2013 3:07 am
I have a problem. At first ... I read a values into a form, method post, like this ...
Code: Select all
$row = mysql_query("SELECT MID(nazov,1,1) AS nazov FROM book GROUP BY MID(nazov,1,1)");
while ( $db = mysql_fetch_assoc($row) )
print "<form id=myForm method=post action=blablabla>";
print "<input type=text name=id value=".$db['nazov'].">";
print "<a href=\"#\" onclick=\"myForm.submit()\" >".$db['nazov']."</a>";
but when I try to read a $_POST['id'] value on page blablabla .... it loads me always the first value of table .... and i dont know why ..... can you help me?
- php-forum Super User
- Posts: 1805
- Joined: Thu Mar 10, 2011 5:07 pm
make sure you have the right query....make sure the query is picking the data that you want and then debug to see why $_POST is behaving in an odd manner.
Who is online
Users browsing this forum: No registered users and 2 guests