Re: beginner: HELP

From: Date: Tue, 06 May 2003 18:54:31 +0000
Subject: Re: beginner: HELP
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-19781@lists.php.net to get a copy of this message
The question is: What doesn't work about it? btw, when you use print, you don't need the brackets print ("<center><table border='2' width='100%' bordercolor='black' cellspacing='1'>\n"); should be print "<center><table border='2' width='100%' bordercolor='black' cellspacing='1'>\n"; *** ADVANCED FEATURE *** Read only if you want to learn something new If you use print 'This Text', php will not actually look at the part between ' '. This means you can use php to print loads of php code without it using up valuable resources. For example print "$MyVariable"; would display the value of $MyVariable print '$MyVariable'; would display $MyVariable on the screen. Useful stuff :-) ----- Original Message ----- From: "cablenews.casema.net" <staafmixer@wanadoo.nl> To: <php-windows@lists.php.net> Sent: Friday, May 02, 2003 12:23 PM Subject: [PHP-WIN] beginner: HELP > Maybe a beginner question, but why doesn't this code work??? > > tnx, tristan > > <html> > > <head><title>persoon administratie</title> > <body> > > <?php > > mysql_connect ('localhost','',''); > mysql_select_db("tristan"); > > $query = "SELECT voornaam, achternaam, adres, adres_nr, postcode, > woonplaats, telefoonnr, geslacht, notitie, id FROM persoon;"; > $result = mysql_query($query); > > > while ($rij = mysql_fetch_array($result)) { > > $voornaam = $rij["voornaam"]; > $achternaam = $rij["achternaam"]; > $adres = $rij["adres"]; > $adresnr = $rij["adres_nr"]; > $postcode = $rij["postcode"]; > $woonplaats = $rij["woonplaats"]; > $telefoonnr = $rij["telefoonnr"]; > $geslacht = $rij["geslacht"]; > $notitie = $rij["notitie"]; > $id = $rij["id"]; > > > print ("<center><table border='2' width='100%' > bordercolor='black' > cellspacing='1'>\n"); > print ("<tr><td width='100%' bgcolor='white'><font > size='2'>VOORNAAM: > $voornaam"); > print ("<tr><td width='100%' bgcolor='white'><font > size='2'>ACHTERNAAM: > $achternaam"); > print ("<tr><td width='100%' bgcolor='white'><font > size='2'>ADRES: > $adres"); > print ("<tr><td width='100%' bgcolor='white'><font > size='2'>ADRESNR: > $adresnr"); > print ("<tr><td width='100%' bgcolor='white'><font > size='2'>POSTCODE: > $postcode"); > print ("<tr><td width='100%' bgcolor='white'><font > size='2'>WOONPLAATS: > $woonplaats"); > print ("<tr><td width='100%' bgcolor='white'><font > size='2'>TELEFOONNR: > $telefoonnr"); > print ("<tr><td width='100%' bgcolor='white'><font > size='2'>GESLACHT: > $geslacht"); > print ("<tr><td width='100%' bgcolor='white'><font > size='2'>NOTITIE: > $notitie"); > print("</table></center><br><br>\n\n"); > } > > ?> > > </body> > </html> > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.windows (#19781) next »