hi all.i have faced a problem.
input used:
i have a mysql database named form.there is a table named dynamic.
three attributes here
id ( primary key,auto increment)
name.
company.
Expected result:
i want to show the data of the name field and make them a link to go to another page as like as:
mushfiq
mishuk
the two above name will used to go to the page "dynamic2.p hp" .As for example ,if i click on mushfiq,the url will be "dynamic2.p hp" & in that show the company where mushfiq works.but
mushfiq
mishuk
is not showed by ..
error codes:
Parse error: syntax error, unexpected $end in c:\wamp\www\dyn amic.php on line 33
may be problem is in that line:
<a href="dynamic2. php?id=<?php $id ?>"> <?php echo $name; ?> </a> <br >
but i m not sure.if anyone can help me, i will be greatful.
input used:
i have a mysql database named form.there is a table named dynamic.
three attributes here
id ( primary key,auto increment)
name.
company.
Expected result:
i want to show the data of the name field and make them a link to go to another page as like as:
mushfiq
mishuk
the two above name will used to go to the page "dynamic2.p hp" .As for example ,if i click on mushfiq,the url will be "dynamic2.p hp" & in that show the company where mushfiq works.but
mushfiq
mishuk
is not showed by ..
error codes:
Parse error: syntax error, unexpected $end in c:\wamp\www\dyn amic.php on line 33
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title> </title> </head> <body> <?php mysql_connect("localhost", "root", ""); mysql_select_db("form"); $result=mysql_query("select name from dynamic") or die(mysql_error()); if(mysql_num_rows($result)==0) { echo "database is empty <br>"; } else { while(list($id,$name)=mysql_fetch_array($result)) { ?> <a href="dynamic2.php?id=<?php $id ?>"> <?php echo $name; ?> </a> <br > <?php } ?> </body> </html>
<a href="dynamic2. php?id=<?php $id ?>"> <?php echo $name; ?> </a> <br >
but i m not sure.if anyone can help me, i will be greatful.
Comment