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>";
?>

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.