|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Next php code is being included in a table on a link page. For each category there is a script like this one. But it gives an error for the last php tag. can anybody tell me what's wrong?
<? $verbinding=mysql_connect("localhost", "phpgebruiker", "php"); mysql_select_db("webleren"); $query = "SELECT sitenaam, url FROM linkpagina WHERE categorie=='science fiction'; $resultaat = mysql_query($query); while ($T_string) { $T_string = mysql_fetch_assoc($resultaat); print $T_string($sitenaam); $T_string = mysql_fetch_assoc($resultaat); }?> <? mysql_free_result($resultaat); mysql_close($verbinding); ?> |
|
|||
|
Quote:
Quote:
print $T_string['sitenaam']; And I hope you are aware that this loop prints only every second row and you will have to work on the formating of the ourput. best regards - Sam
__________________
Software-Pointers.com - Directory of Software Development Sites - Free submission. |
|
|||
|
Quote:
Quote:
print $T_string['sitenaam']; And I hope you are aware that this loop prints only every second row and you will have to work on the formating of the output. best regards - Sam
__________________
Software-Pointers.com - Directory of Software Development Sites - Free submission. |
|
|||
|
Looks a bit strange to me, i havent tested this but maybe:
<? $verbinding=mysql_connect("localhost", "phpgebruiker", "php"); mysql_select_db("webleren"); $query = "SELECT sitenaam, url FROM linkpagina WHERE categorie='science fiction'"; $result = mysql_query($query, $verbinding); if ($myrow = mysql_fetch_array($result)) { do { $Sitenaam = $myrow['sitenaam']; echo $Sitenaam; }while($myrow = mysql_fetch_array($result)); } ?> Not sure though as im a little unsure what you were trying to do.
__________________
Clearlime - leeds,west yorkshire web design |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |