Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi folks ..
I´m trying to build a php script that retrieve data from a mysql database, but the issue is that i get no result when submit a field that later showme that information related ....
here is my script until now ...
file lookfor.php
[syntax="html"]<form action=findok.php method=GET>
Please input id to look for
<input name=idkey type=text id="idkey"
<input name="submit" type=submit id="submit" value="look for it ! ...">
</font> </p>
</form>Code: Select all
<?php
mysql_connect (localhost, user, passwd);
mysql_select_db (database_name);
if ($idkey == "")
{$idkey = '';}
$result = mysql_query ("SELECT * FROM table_name
WHERE idkey LIKE '$idkey'");
if ($row = mysql_fetch_array($result)) {
do {
echo ("Id Key: "); print $row["Id Key"]; print ("<p>");
echo ("Show field2 : "); print $row["field2"];
echo (" Show field 3 "); print $row["field3"];
echo (" Show field 4 "); print $row["field4"]; print ("<p>");
} while($row = mysql_fetch_array($result));
} else {print "there is no info avaliable, please review the idkey...";}
?>I have 2 weeking working on this issue with no results
Any idea ? .. Why i´m not getting the information that match the criteria that the user is looking for ?
thanks in advance ...
greetings
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]