Add to Favorites
Hosting Discussion
 

forgot password?


Reply


Old
  Post #1 (permalink)   05-09-2005, 08:31 AM
HD Wizard
 
Exon's Avatar
 
Join Date: Jul 2003
Location: IA
Posts: 1,020

Status: Exon is offline
Alright so here's what I've got:

A Signup form that works...decently. User John Doe goes to sign up, fills out all the information in the signup form, and an E-mail is sent to me in HTML formatting with the details on what package, their name, etc...

Now the backend of the signup is done via the order.php file. In this file are all the checks and balances of the signup form. Now I'm trying to tweak it a bit as up until now we've had to manually send out links to 2CheckOut for payment. Which works, but is both unprofessional and tedious (in my opinion). So what I'm trying to do is some if, then, else statements. Here's what I've got:

Code:
<form method="post" action="./index.php?page=order" name="Signup" onsubmit="return validate()">
and
Code:
<span class="anormal"><INPUT TYPE="radio" NAME="package" VALUE="basic">Basic</span>
ok...now it takes all the information and goes to the order.php page which will then validate the info and send the user to another page...
Code:
$package  = @$HTTP_POST_VARS['package'];
ok...and now further down the order.php page:
Code:
if($package=="basic"){
	$redirectURL = "$basic2co";
}
$basic2co = "https://www.2checkout.com/2co/buyer/purchase?sid=111156&quantity=1&product_id=1"; // the URL of the 2CheckOut Payment Page.
But I get an error:
Quote:
Originally Posted by stupid error
Parse error: parse error, unexpected $ in /home/exonnet/public_html/content/order.php on line 162
here is line 160-162 on order.php:
Code:
?>
<?php include "bottom.php" ?>
<? //include "../content/bottom.php" ?>
This is how it was when it was coded...I'm assuming the commented extra include can come out...but when I do that then I have an error on line 161...the top is commented identically so I'm figuring when I had it coded "back in the day" the programmer had it like this for some reason unbeknownst to me.

What I'd like to happen is for order.php to validate against signup.php and check what the "package" value is set at and from there redirect the user to the appropriate 2Checkout page.

*sigh* and I have very small amounts of coding experience so bear with me.

I forgot to include this part that is in the order.php page:
Code:
header("Location: ".$redirectURL);
__________________
John "Exon" Pinkerton
jpinkerton@exonnet.net
http://www.ExonNet.net

Last edited by Exon : 05-09-2005 at 08:34 AM. Reason: Forgot to mention
 
 
 


Old
  Post #2 (permalink)   05-09-2005, 09:26 AM
HD Community Advisor
 
ANMMark's Avatar
 
Join Date: Sep 2004
Location: Pennsylvania
Posts: 1,580

Status: ANMMark is offline
You're missing the ending ;

Should be:
<?php include "bottom.php"; ?>
__________________
Mark - Co-President/Lead Developer
avidInteractive Software
The ServeraSuite 2007 Award Winning Professional Server Monitoring Solution - Click here
 
 
 


Old
  Post #3 (permalink)   05-09-2005, 12:46 PM
HD Wizard
 
Exon's Avatar
 
Join Date: Jul 2003
Location: IA
Posts: 1,020

Status: Exon is offline
Quote:
Originally Posted by Stupid Error
Parse error: parse error, unexpected $ in /home/exonnet/public_html/content/order.php on line 161
Line 160
Code:
?>
Line 161
Code:
<?php include "bottom.php"; ?>
__________________
John "Exon" Pinkerton
jpinkerton@exonnet.net
http://www.ExonNet.net
 
 
 


Old
  Post #4 (permalink)   05-09-2005, 03:47 PM
HD Community Advisor
 
ANMMark's Avatar
 
Join Date: Sep 2004
Location: Pennsylvania
Posts: 1,580

Status: ANMMark is offline
John,

ANy chance you could send me the file itself? It would be a lot easier to troubleshoot.
__________________
Mark - Co-President/Lead Developer
avidInteractive Software
The ServeraSuite 2007 Award Winning Professional Server Monitoring Solution - Click here
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On