Following my earlier message I had some replies which suggested a way to solve my problem. Unfortuantelu I cannot seem to get the suggested code to work. This may well be because I have mistyoed something.
The script I am running is: <? session_start(); ?> <html> <body> user:<?=$_SESSION['dbauser']?><br> password:<?=$_SESSION['dbapassword']?><br> <A HREF="modifycataloguerange.htm" TARGET="Lower"><IMG SRC="/jpg/modify.jpg" BORDER=0></A></LEFT> <A HREF="addcataloguerange.htm" TARGET="Lower"><IMG SRC="/jpg/addnew.jpg" BORDER=0></A></LEFT> <A HREF="deletecataloguerange.htm" TARGET="Lower"><IMG SRC="/jpg/deleterow.jpg" BORDER=0></A></LEFT> <?php /* Connecting, selecting database */ $link = mysql_pconnect("localhost",$_SESSION['dbauser'],$_SESSION['dbapassword']) or die("Could not connect"); print "Connected successfully<P>"; mysql_select_db("stamps") or die("Could not select database"); $result = mysql_query("SELECT * FROM CATALOGUE_RANGES"); /* Table definition: CREATE TABLE catalogue_ranges( catalogue_range_key INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, sg_start_number VARCHAR(80) NOT NULL, sg_end_number VARCHAR(80) NOT NULL) TYPE=InnoDB ; */ /* print ("<TABLE BORDER=5 WIDTH=90%>"); print ("<TR>"); print ("<TD WIDTH=20%> <B>ID </B>"); print ("<TD WIDTH=30%> <B>Start Number</B>"); print ("<TD WIDTH=30%> <B>End Number</B>"); print ("<TD WIDTH=10%> <B>Modify</B>"); print ("<TD WIDTH=10%> <B>Delete</B>"); */ foreach($result as $row){ echo '<tr><td><a href="delete.php?id='.$row[catalogue_range_key].'">'.$row[sg_start_number].' </a></td></tr>'; } ?> </body> </html> The screen displays the icons and the connection message but nothing else The error log from apache is: [Fri Jun 07 16:07:55 2002] [info] Parent: Created child process -1734187 [Fri Jun 07 16:07:55 2002] [info] Parent: Duplicating socket 104 and sending it to child process -1734187 [Fri Jun 07 16:07:56 2002] [info] BytesRead = 372 WSAProtocolInfo = 020 [Fri Jun 07 16:08:38 2002] [error] PHP Warning: Invalid argument supplied for foreach() in c:\usr\www\my-domain\cataloguerangeslist.php on line 27 [Fri Jun 07 16:09:43 2002] [error] PHP Warning: Invalid argument supplied for foreach() in c:\usr\www\my-domain\cataloguerangeslist.php on line 27 [Fri Jun 07 16:10:08 2002] [info] master_main: Shutdown event signaled. Shutting the server down. [Fri Jun 07 16:10:10 2002] [info] removed PID file c:/usr/local/apache/logs/httpd.pid (pid=-1747971) Can anyone please tell me what the problem is. Is there any documentation which directly relates to using PHP with MySQL? Regards Peter Goggin ----- Original Message ----- From: "Peter Goggin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 11:54 PM Subject: PHP amd MYSQL > I am setting up a web page system which involves html pages, php pages and > mysqldatabase. > > I have a number of questions and do not know where to find answers. > > If I display the rows from a database table in a php generated html table > is it possible to mark a row so that it can be deleted or modified by > calling another php page? If so is this documented anywhere? > > Is there any good source of information on setting up 'forms'to work like > Oracle forms where database records can be inserted, updated or deleted? > > > Regards > > > Peter Goggin > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php