Re: [PHP] Which link was selected?
Leonard Burton schrieb: Greetings, You ought to make your link something like www.foo.com/products.php?autoid=105. and then make a query on your page that displays the pics based on an autoincrement number in your table. You ought to be able to make the code something like: //Display link for product print a href=products.php?autoid=.$row[autoid].; print img src=images/.$row[product_pic]./a; ON your products.php page youd want to have code something like; if ($auto) { $result = select * from product_info where autoid=$autoid if ($result) { while ($row = mysql_fetch_array($result)) { $stuff=$row[stuff]; $stuff1=$row[stuff1]; $stuff2=$row[stuff2]; $stuff3=$row[stuff3]; } mysql_free_result($result); print All that stuff here; } else { include product_display_page.php; } I hope it helps. Leonard. ups .. someone was quite faster than me in answering ... and it looks quit better than my way ... the only thing I want to note ... use arround values of HTML tags ;-) -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Which link was selected?
Good Catch, Be just as an advisement besure to escape those quotes with a backslash \ Leonard. -Original Message- From: Götz Lohmsnn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 4:09 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Which link was selected? Leonard Burton schrieb: Greetings, You ought to make your link something like www.foo.com/products.php?autoid=105. and then make a query on your page that displays the pics based on an autoincrement number in your table. You ought to be able to make the code something like: //Display link for product print a href=products.php?autoid=.$row[autoid].; print img src=images/.$row[product_pic]./a; ON your products.php page youd want to have code something like; if ($auto) { $result = select * from product_info where autoid=$autoid if ($result) { while ($row = mysql_fetch_array($result)) { $stuff=$row[stuff]; $stuff1=$row[stuff1]; $stuff2=$row[stuff2]; $stuff3=$row[stuff3]; } mysql_free_result($result); print All that stuff here; } else { include product_display_page.php; } I hope it helps. Leonard. ups .. someone was quite faster than me in answering ... and it looks quit better than my way ... the only thing I want to note ... use arround values of HTML tags ;-) -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Which link was selected?
Leonard Burton schrieb: Good Catch, Be just as an advisement besure to escape those quotes with a backslash \ Leonard. yes, you are right, but I also prefer the way of ?php // do something here ? a href=go somwhereimg src=image.gif name=myname border=0/a ?php // do something here ? instead of ?php // do something here echo a href=\go somwhere\; echo img src=\image.gif\ name=\myname\ border=\0\/a; // do something here ? cause its easyer to change HTML code afterwards without hacking \ everywhere and you could preview styles in browser if you looking for a file but that's just freaky to discuss which one might be better ... ;-) -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Which link was selected?
Hi, I put pictures from a database ont the page about my products. If the user click on a picture I want to give a detailed description about the product. But how can I get, which picture was selected? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Which link was selected?
Greetings, You ought to make your link something like www.foo.com/products.php?autoid=105. and then make a query on your page that displays the pics based on an autoincrement number in your table. You ought to be able to make the code something like: //Display link for product print a href=products.php?autoid=.$row[autoid].; print img src=images/.$row[product_pic]./a; ON your products.php page youd want to have code something like; if ($auto) { $result = select * from product_info where autoid=$autoid if ($result) { while ($row = mysql_fetch_array($result)) { $stuff=$row[stuff]; $stuff1=$row[stuff1]; $stuff2=$row[stuff2]; $stuff3=$row[stuff3]; } mysql_free_result($result); print All that stuff here; } else { include product_display_page.php; } I hope it helps. Leonard. -Original Message- From: Karina S [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 2:06 AM To: [EMAIL PROTECTED] Subject: [PHP] Which link was selected? Hi, I put pictures from a database ont the page about my products. If the user click on a picture I want to give a detailed description about the product. But how can I get, which picture was selected? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php