supergrame Posted December 10, 2008 Share Posted December 10, 2008 hello im very new to php. im having a problem with this script you see what its ment to do is when you click register an account you need to pay 3 people then the account is created. but what it does is keeps lookping the first payment it never gets to the second step. im going to post the page that i think the problem is on i really hope you guys can help me with this. thanx <? session_start(); include'config.php'; $title="Join now to $CONFIG->sitename"; include("$CONFIG->templatedir/header_locked.php"); /////////////////////////////////////// $stage=$_GET['stage']; switch($stage){ default: $page_content=" <div align=center class=text> <br>Your sponsor is :<font color=red>".$_SESSION["sponsor"]["firstname"] ." ".$_SESSION["sponsor"]["lastname"]."</font>"; $page_content.=grab_content("joinp"); $page_content=html_entity_decode(stripslashes($page_content)); $page_content.=" <fieldset class=text><legend>Please choose the payment processor</legend> "; //include the payment forms if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->sponsorfee,$_SESSION["sponsor"]["paypal"],"1");} if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->sponsorfee,$_SESSION["sponsor"]["stormpay"],"1");} if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->sponsorfee,$_SESSION["sponsor"]["egold"],"1");} if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->sponsorfee,$_SESSION["sponsor"]["intgold"],"1");} $page_content.="</fieldset>"; Break; case primu: $_SESSION["sponsor"]["pay"]='ok'; $page_content=" <div align=center class=text> <b>First step succeded!<br>You are now on the second step.</b> <br>Your random sponsor is :<font color=red>".$_SESSION["random1"]["firstname"] ." ".$_SESSION["random1"]["lastname"]."</font>"; $page_content.=" <fieldset class=text><legend>Please choose the payment processor</legend> "; //include the payment forms if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->randomfee,$_SESSION["random1"]["paypal"],"2");} if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->randomfee,$_SESSION["random1"]["stormpay"],"2");} if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->randomfee,$_SESSION["random1"]["egold"],"2");} if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->randomfee,$_SESSION["random1"]["intgold"],"2");} $page_content.="</fieldset>"; break; /**************************ADMIN*********************************/ case adminul: $_SESSION["sponsor1"]["pay"]='ok'; $page_content=" <div align=center class=text> <b>Final step!<br>Pay the $CONFIG->sitename admin<br></b>"; $page_content.=" <fieldset class=text><legend>Please choose the payment processor</legend> "; $q1=db_fetch_array(db_query("select username , paypal ,stormpay,egold,intgold from users where id='1'")); //include the payment forms if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->adminfee,$q1["paypal"],"3");} if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->adminfee,$q1["stormpay"],"3");} if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->adminfee,$q1["egold"],"3");} if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->adminfee,$q1["intgold"],"3");} $page_content.="</fieldset>"; break; } include("$CONFIG->templatedir/content.php"); include("$CONFIG->templatedir/footer.php"); ?> Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/ Share on other sites More sharing options...
redarrow Posted December 10, 2008 Share Posted December 10, 2008 Your missing the ' ' <<<<< case 'value': It your switch condition no quotes Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/#findComment-712034 Share on other sites More sharing options...
supergrame Posted December 10, 2008 Author Share Posted December 10, 2008 so you are saying it should be like this case 'adminul:' no case adminul: Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/#findComment-712043 Share on other sites More sharing options...
supergrame Posted December 10, 2008 Author Share Posted December 10, 2008 ok well i did changed the case to case 'value': but the same prblem click to go to paypal then pay and when return its back to the same page when it should be up to step 2 pay the random member. im lost Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/#findComment-712056 Share on other sites More sharing options...
redarrow Posted December 10, 2008 Share Posted December 10, 2008 <?php session_start(); include'config.php'; $title="Join now to $CONFIG->sitename"; include("$CONFIG->templatedir/header_locked.php"); /////////////////////////////////////// $stage=$_GET['stage']; switch($stage){ case 'default': $page_content=" <div align=center class=text> <br>Your sponsor is :<font color=red>".$_SESSION["sponsor"]["firstname"] ." ".$_SESSION["sponsor"]["lastname"]."</font>"; $page_content.=grab_content("joinp"); $page_content=html_entity_decode(stripslashes($page_content)); $page_content.=" <fieldset class=text><legend>Please choose the payment processor</legend> "; //include the payment forms if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->sponsorfee,$_SESSION["sponsor"]["paypal"],"1");} if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->sponsorfee,$_SESSION["sponsor"]["stormpay"],"1");} if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->sponsorfee,$_SESSION["sponsor"]["egold"],"1");} if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->sponsorfee,$_SESSION["sponsor"]["intgold"],"1");} $page_content.="</fieldset>"; Break; case 'primu': $_SESSION["sponsor"]["pay"]='ok'; $page_content=" <div align=center class=text> <b>First step succeded!<br>You are now on the second step.</b> <br>Your random sponsor is :<font color=red>".$_SESSION["random1"]["firstname"] ." ".$_SESSION["random1"]["lastname"]."</font>"; $page_content.=" <fieldset class=text><legend>Please choose the payment processor</legend> "; //include the payment forms if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->randomfee,$_SESSION["random1"]["paypal"],"2");} if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->randomfee,$_SESSION["random1"]["stormpay"],"2");} if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->randomfee,$_SESSION["random1"]["egold"],"2");} if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->randomfee,$_SESSION["random1"]["intgold"],"2");} $page_content.="</fieldset>"; break; /**************************ADMIN*********************************/ case 'adminul': $_SESSION["sponsor1"]["pay"]='ok'; $page_content=" <div align=center class=text> <b>Final step!<br>Pay the $CONFIG->sitename admin<br></b>"; $page_content.=" <fieldset class=text><legend>Please choose the payment processor</legend> "; $q1=db_fetch_array(db_query("select username , paypal ,stormpay,egold,intgold from users where id='1'")); //include the payment forms if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->adminfee,$q1["paypal"],"3");} if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->adminfee,$q1["stormpay"],"3");} if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->adminfee,$q1["egold"],"3");} if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->adminfee,$q1["intgold"],"3");} $page_content.="</fieldset>"; break; } include("$CONFIG->templatedir/content.php"); include("$CONFIG->templatedir/footer.php"); ?> Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/#findComment-712057 Share on other sites More sharing options...
supergrame Posted December 10, 2008 Author Share Posted December 10, 2008 never mind that worked thank you.. but now when i go back its just a blank page i think is should say step 2 but its just blank i dont mean an error i mean the links bar and header is all there just were the stage 2 content and paypal button is ment to be i would guess ant there!@!@!@!@! Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/#findComment-712059 Share on other sites More sharing options...
redarrow Posted December 10, 2008 Share Posted December 10, 2008 your getting the condition from the url where stage=what_ever <<< make sure they match the switch condition ok... Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/#findComment-712076 Share on other sites More sharing options...
supergrame Posted December 10, 2008 Author Share Posted December 10, 2008 ok well the last post was incorrect. what actully happend after adding the '' to case---- i went back to the join.php and its blank it doesent even show the first stage as it was before. Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/#findComment-712081 Share on other sites More sharing options...
supergrame Posted December 10, 2008 Author Share Posted December 10, 2008 ill add the config.php maybe that will help. ? class object {}; $CONFIG = new object; /* Edit the database connection parameters below */ $CONFIG->dbhost = "####"; $CONFIG->dbname = "####"; $CONFIG->dbuser = "####"; $CONFIG->dbpass = "####"; /*Edit the path to the scripts below*/ $CONFIG->wwwroot = "/homepages/4/d262511548"; //Site URL -please use the "http://www.mysite.com" format. $CONFIG->siteurl = "http://www.coin-crazy.com"; // the support email address-all the mails from the contact form will go there $CONFIG->support = "[email protected]."; //Site name-this will be shown on the header,and footer,and also on every email sent $CONFIG->sitename = "Coin-Crazy Cash Randomizer"; //Payment fees:---Use the same format,otherwise the forms won't work //for admin $CONFIG->adminfee="0.25"; //for sponsor $CONFIG->sponsorfee="0.25"; //for random membbers $CONFIG->randomfee="0.25"; //Payment processors //Change TRUE with FALSE if you don't want to use one of them. //However,the registration form requires a valid paypal AND stormpay address to work $CONFIG->allowpaypal=true; $CONFIG->allowstormpay=false; $CONFIG->allowegold=false; $CONFIG->allowintgold=false; Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/#findComment-712088 Share on other sites More sharing options...
supergrame Posted December 11, 2008 Author Share Posted December 11, 2008 if you want me to include any of the other code just ask although think it has to do with thoses 2 files. Link to comment https://forums.phpfreaks.com/topic/136427-i-have-a-payment-problem-with-my-script-please-help/#findComment-712118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.