Jump to content

[SOLVED] Storing URL value into a variable.


ghosh

Recommended Posts

here's an example of something I did that sores a URL in a variable. I don't think it's exactly what you're asking though. After rereading your post I realize I didn't get what you meant. lol

<?php
if (($_POST['answer'])=="Yes"):
$link="http://www.domain.com/images/yes.gif";
else:
$link="http://www.domain.com/images/no.gif";
endif;
echo "Your colorful answer is <IMG SRC=\"".$link."\"></IMG>";
?>

 

here's an example of something I did that sores a URL in a variable. I don't think it's exactly what you're asking though. After rereading your post I realize I didn't get what you meant. lol

<?php
if (($_POST['answer'])=="Yes"):
$link="http://www.domain.com/images/yes.gif";
else:
$link="http://www.domain.com/images/no.gif";
endif;
echo "Your colorful answer is <IMG SRC=\"".$link."\"></IMG>";
?>

 

 

WHat I mean is, I am making a non profit web for public to learn more about the harmful effects of various things of daily life. There is a option to post comments in each page. After posting comment I want to redirect each visitors back to the page from where they came. other wise it will be a cumbersome process for them to search for the same page... when my website grows.

 

so I was asking for some code by which I can send them back to the place from where they came.

 

thanks for taking so much interest to know.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.