Results 1 to 3 of 3

Thread: Redirect problem

  1. #1
    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 !

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    3

    Default

    :'(

  3. #3
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •