retrieve values from url

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
indian98476
Forum Commoner
Posts: 78
Joined: Tue Dec 15, 2009 3:24 am

retrieve values from url

Post by indian98476 »

:banghead: lost my brains dudes....

i want to pass values from my form to a pop-up window and then retrieve those values in that pop-up window and display them, say like a preview of details entered in the form in a new pop-up window....i have retrieved the value, but it just doesn't seem to reach to the url of the pop-up window though it prints out the value...here is my code...

For the values

Code: Select all

$batch1 = $_POST['title'];
	$batch2 = $_POST['link'];
	$batch3 = $_POST['experience'];
	$batch4 = $_POST['explanation'];
	$batch5 = $_POST['comment'];
	$batch6 = $_POST['ownerid'];
	$batch7 = $_GET['category'];
	$batch8 = $_POST['author'];
	$batch9 = $_POST['num'];
For the preview button

Code: Select all

echo "<p ><div style='padding-left:185px;'><input class='button' type=submit name=preview onClick="."window.open('http://alltherankings.com/staging/preview.php?param1=$batch1&param2=$batch2&param3=$batch3&param4=$batch4&param5=$batch5&param6=$batch6&param7=$batch7&param8=$batch8&param9=$batch9','previewwindow','width=400,height=200')" ." value='Preview'>
	<input type=submit name=save class='button' value='Publish'></div></form></p>";
indian98476
Forum Commoner
Posts: 78
Joined: Tue Dec 15, 2009 3:24 am

Re: retrieve values from url

Post by indian98476 »

i tried this still no luck!

Code: Select all

<?php echo "<p ><div style='padding-left:185px;'><input class='button' type=submit name=preview onClick=window.open('http://alltherankings.com/staging/preview.php?param1="?><?php echo $batch1; ?><?php "&param2=$batch2&param3=$batch3&param4=$batch4&param5=$batch5&param6=$batch6&param7=$batch7&param8=$batch8&param9=$batch9','previewwindow','width=400,height=200')" ." value='Preview'>
	<input type=submit name=save class='button' value='Publish'></div></form></p>"; ?>
eskio
Forum Commoner
Posts: 66
Joined: Tue Apr 01, 2008 1:00 am

Re: retrieve values from url

Post by eskio »

Hi,
if want to retrieve values from url, use $_GET[] instead of $_POST[].
Post Reply