Reply
sending a variable in a link
Old 08-08-2004, 04:12 PM sending a variable in a link
lajkonik86's Avatar
Ultra Talker

Posts: 389
Trades: 0
Heey guys i'm sort of new to php and need a bit of help.
I've looked trough many tutorials but never found a good explanation how to send a var trough a link.

Let's say i've got a screenshot page and the only thing i want to change is the image. So my anchor would look like http://www.blabla.php?src="blue.jpeg" or whatever.
This is what i see when browsing the web.
But could anyone please give me a very basic example of how to do this.


Greetz
Thierry
lajkonik86 is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 08-08-2004, 04:25 PM
Unknown.

Posts: 1,693
Trades: 0
A simple example...

PHP Code:
<?php

$picture_source 
$_GET['src'];

?>

<html>

<body>

<img src="<?php echo $picture_source ?>">

</body>

</html>
So for example if you typed...
pagename.php?src=imagename.jpg

The imagename.jpg image would be shown...

Hope this helps

If you need any more help just ask

-James
Dark-Skys99 is offline
Reply With Quote
View Public Profile
 
Old 08-08-2004, 04:37 PM
lajkonik86's Avatar
Ultra Talker

Posts: 389
Trades: 0
Got it

Thanks for the help.
lajkonik86 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to sending a variable in a link
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.08593 seconds with 13 queries