I am trying to post a link to the following website on my blog:


the default option for cause you would like to donate to is: haiti.

Id like to edit the url so that when someone clicks it the selected option should be Pakistan. Maybe something like:

http://donate.ifrc.org/?desc="Pakistan: monsoon floods"

is there a way to do this?


Recommended Answers

All 2 Replies

You could do it through a form which sends the information to a php-script which redirects the user to the donation site. The script could look something like this:

$desc = mysql_real_escape_string($_GET['desc']);
$redirect = "http://donate.ifrc.org/?desc=".$redirect;

header("location: $redirect");

Or you could retrieve the values by JavaScript but I guess this is the safer way to go since people might have JavaScript turned off in their browser. :)

If your problem has been solved, please also mark the thread as solved :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.