RE: [PHP-DB] Related frames

From: Date: Fri, 16 Feb 2001 01:06:07 +0000
Subject: RE: [PHP-DB] Related frames
Groups: php.db 
Request: Send a blank email to php-db+get-6677@lists.php.net to get a copy of this message
It worked!! Você é um gênio!! Thanks a bunch, John -----Original Message----- From: JJeffman [ mailto:jjeffmanweb@conex.com.br <mailto:jjeffmanweb@conex.com.br> ] Sent: Thursday, February 15, 2001 6:59 PM To: John Halladay; PHP DB List (E-mail) Subject: Re: [PHP-DB] Related frames How about use "<A TARGET='main' HREF=\"" ... HTH JAYME. -----Mensagem Original----- De: John Halladay <John.halladay@ascensus.com> Para: PHP DB List (E-mail) <php-db@lists.php.net> Enviada em: quinta-feira, 15 de fevereiro de 2001 19:46 Assunto: [PHP-DB] Related frames > I'm trying to have a link in one frame display data in the main frame. Here > is an example of what I have set up. Normally in HTML you would have > TARGET="main" in the <a href=""> </a> spot, but I tried that > and it gives me > a parse error. Any ideas on how to do it, or does anyone have know of any > websites that I could check. > > Thanks, > John Halladay > > <html> > > <body> > > <?php > > $db = mysql_connect("localhost", "root"); > > mysql_select_db("mydb",$db); > > // display individual record > > if (isset($id)) { > > $result = mysql_query("SELECT * FROM employees WHERE id=$id",$db); > > $myrow = mysql_fetch_array($result); > > printf("First name: %s\n<br>", $myrow["first"]); > > printf("Last name: %s\n<br>", $myrow["last"]); > > printf("Address: %s\n<br>", $myrow["address"]); > > printf("Position: %s\n<br>", $myrow["position"]); > > } else { > > // show employee list > > $result = mysql_query("SELECT * FROM employees",$db); > > if ($myrow = mysql_fetch_array($result)) { > > // display list if there are records to display > > do { > > printf("<a href=\"%s?id=%s\">%s %s</a><br>\n", $PHP_SELF, > $myrow["id"], > $myrow["first"], $myrow["last"]); > > } while ($myrow = mysql_fetch_array($result)); > > } else { > > // no records to display > > echo "Sorry, no records were found!"; > > } > > } > > ?> > > </body> > > </html> > > -- > PHP Database Mailing List ( http://www.php.net/ <ÅèÍæF�£` > Ù„4v”http://www.php.net/> ) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#6677) next »