Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 12-01-2007, 03:49 PM   #1 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default Script Help!

Hello

Im having a little trouble getting my head around the following:

I have a site that needs to take data from the user (in the form of a form field) and in this case its a web address.

The form needs to take that entered data and apply to the end of this url
http://www.artviper.net/screenshots/screener.php?url=

For example if the user entered Solve My Problem UK - Home the url output would look like the following

http://www.artviper.net/screenshots/...yproblem.co.uk

Thanks for you help. I take it i need PHP and mine is pretty useless!:laughing:
Yek is offline  
Old 12-09-2007, 09:55 AM   #2 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Script Help!

I'm not sure if you wanted it to print the URL, or go to the URL, so I made two:

url.php (prints the URL)
Code:
<?php

if (isset ($_POST['submit'])) {
	$url = $_POST['url'];
	echo 'http://www.artviper.net/screenshots/screener.php?url='.$url.'';
} else {
	echo '<form action="url.php" method="post">
	URL: <input type="text" name="url" />
	<br />
	<input type="submit" name="submit" value="Submit!" />
	</form>';
}

?>
OR

url.php (goes to URL)
Code:
<?php

if (isset ($_POST['submit'])) {
	$url = $_POST['url'];
	header ('location: http://www.artviper.net/screenshots/screener.php?url='.$url.'');
} else {
	echo '<form action="url.php" method="post">
	URL: <input type="text" name="url" />
	<br />
	<input type="submit" name="submit" value="Submit!" />
	</form>';
}

?>

__________________

Need website help? PM me!
CrazeD is offline  
 
Closed Thread

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Script Yek Programming Discussions 8 10-29-2007 06:35 PM
Transformers Abridged Script bobojuice Off Topic Discussion 5 10-18-2007 08:38 AM
Can someone write this script for me? Count clicks Quintox Programming Discussions 2 06-28-2007 04:35 AM
Need a good captcha generating php script surut Windows Operating Systems and Software 1 05-26-2007 09:23 AM