vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v4.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2012, 02:30 PM
Interista Interista is offline
Junior Member
 
Join Date: Jan 2012
Posts: 3
Default Redirect problem

Hi, I have created page and the type of the page is PHP File, So I have put my php page into Custom Page Content etc. !

The page :
Code:
<?php

	if(isset($_POST['submit1'])) {
		$errors = array();
		
		$username = trim($_POST['username']);
		$prod = trim($_POST['prod']);
		header("Location: http://www.mysite.com/donate/paypal.php?username=". $username ."&prod=". $prod);
		exit;
	}
		
?>
<fieldset class="menu main">

	
	<form action="<?php echo basename($_SERVER['PHP_SELF']); ?>" method="POST">
		<table>
			<tr>
				<td>Username:</td>
				<td><input type="text" name="username" value="" /></td>
			</tr>
			<select name="prod">
				<option value="1">1</option>
				<option value="2">2</option>
				<option value="3">3</option>
			</select>
			<tr>
				<td colspan="2"><input type="submit" name="submit1" value="Click here" /></td>
			</tr>
		</table>
	</form>
</fieldset>

My problem is when I press on the button, It's not redirecting me to the link which I want ,, Instead It redirect me to my home page !
Reply With Quote
  #2  
Old 01-20-2012, 05:37 PM
Interista Interista is offline
Junior Member
 
Join Date: Jan 2012
Posts: 3
Default

:'(
Reply With Quote
  #3  
Old 01-24-2012, 05:27 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

In this line:
PHP Code:
<form action="<?php echo basename($_SERVER['PHP_SELF']); ?>" method="POST">
Try changing the action="" part to point to the location of your original PHP file and see if that helps.
__________________
Frequently Asked Questions
CMPS Users Manual

For vBadvanced software assistance, please use the support forums.
Unsolicted PMs, IMs, and email will not be responded to.
If you have a non-software related question or problem with your account, please submit a support ticket.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid Redirect URL mrderanged Troubleshooting & Problems 1 08-05-2011 10:44 PM
How to redirect? str8upchaldo14 "How Do I..." Questions 8 02-15-2011 01:51 PM
Vba Redirect m002.p Module & Modification Discussion & Requests 0 04-08-2007 06:36 PM
301 Redirect K2_02 "How Do I..." Questions 1 03-26-2007 01:41 PM
Redirect. wishdragon Troubleshooting & Problems 1 09-27-2006 02:10 PM


All times are GMT -4. The time now is 04:31 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.