Help changing value in PHP

I've never used PHP before but am trying to help a friend with his site. I need to change the value of a price check box from 19.95 to 24.95. There are two pages, one which has the check boxes and one which sends the info to paypal. In the form for paypal the value is stored in a variable $cost; but I can't find where this variable is defined. Could some one please take a look at the two pages below and show me where I can change the value for the value of the radio button resume. Thanks.

Here is the page, I want to change it so that when a user checks the radio button for "Purchase resume" it charges 24.95

http://www.resumesummit.com/finish.php

Both pages code is attached, thanks for any help.
SELECTION PAGE
 
<? session_start();
$id = $_SESSION['id'];
 
 if($_SESSION["id"]=="")
  {
    header("location:signin.php");
   }
   
 
//$_SESSION['userid'] = $userid;
require_once("include/globle.php");
 
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="GENERATOR" content="Virtual Mechanics SiteSpinner V2 201">
 <link href="css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  
}
//-->
function activate()
{
 var myoption=-1;
	
	for(i=document.frm.resOptions.length-1; i > -1; i--)
		{
		    //alert(document.frm.resOptions[j].checked);
			
			 if(document.frm.resOptions[i].checked)
			  
			{ 
              myoption=i;
			  i=-1;
		   	}
	  }
	  
	  if(myoption == -1)
	  {
	     alert("Please select purchase option........."); 
	      return false;
	  }	   
		 
    document.frm.method="post";	
	document.frm.action="paypal.php";
    document.frm.submit();
}
function hello()
{
 
      if(document.frm.resOptions.length==3)
	  {
			if(document.frm.resOptions[0].checked==true)
			{
			document.getElementById("Grtf424").style.display="";
			document.getElementById("Grtf425").style.display="none";
			document.getElementById("Grtf426").style.display="none";
			
			}
			if(document.frm.resOptions[1].checked==true)
			{
			document.getElementById("Grtf424").style.display="none";
			document.getElementById("Grtf425").style.display="";
			document.getElementById("Grtf426").style.display="none";
			
			}
			 if(document.frm.resOptions[2].checked==true)
			{
			document.getElementById("Grtf424").style.display="none";
			document.getElementById("Grtf425").style.display="none";
			document.getElementById("Grtf426").style.display="";
			}
			
	    }	
		
		 if(document.frm.resOptions.length==2)
	  {	
			 if(document.frm.resOptions[0].checked==true)
				{
				document.getElementById("Grtf424").style.display="";
				document.getElementById("Grtf425").style.display="none";
				document.getElementById("Grtf426").style.display="none";
				
				}
				if(document.frm.resOptions[1].checked==true)
				{
				document.getElementById("Grtf424").style.display="none";
				document.getElementById("Grtf425").style.display="none";
				document.getElementById("Grtf426").style.display="";
				
				}
	    }					  
		
}
</script>
</head>
 
<body leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<form name="frm" method="post" action="paypal.php">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>		<td><? include("header.php");?></td>
	</tr>
</table>
<? include("maintop.php");?>
<table  width="100%"border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td><!-- ////////////////////////////////   Main content ////////////////////////	--> 
 
		    <table width="100%" name="main" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
      <!-- //////////////////// For left panel ////////////-->
    <!--<td width="190" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td height="28" class="headline1"><div align="center"><span class="headingline1"><a href="#">RESUME 
			  WIZARD</a></span></div></td>
		  </tr>
		  <tr>
			<td height="100%" class="left_table_bg">  <? //include("left.php");?> </td>
		  </tr>
       </table>
	</td>-->
	<!-- //////////////////// End For left panel ////////////-->
	 
    
    <td width="100%" valign="top"  bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
      <tr>
	   
	    <td valign="top" class="bodynew" width="120" style="padding:2px;"> <div style="height:70px;"> </div>
		 <? $sql2="select * from tlbuserinfo where u_id='" .$id. "' and (join_status='Y' or both_status='Y') and (resume_type='RESUME' or both_type='BOTH')" ;  
         $result2 = mysql_query($sql2,$cn) or handle_mysql_query($sql2,mysql_errno(),mysql_error());
		  $num=mysql_num_rows($result2);
          if($num == 0)						
{  
			?>	  
				
		 <b>
		    Preview 1 :  <!--<a href="#" onClick="MM_openBrWindow('prew.php?id=<? print($id);?>&layout=4','','scrollbars=yes,width=800,height=500')">--><a href="#" onClick="MM_openBrWindow('prew.php?id=<? print($id);?>&layout=10','','scrollbars=yes,width=800,height=500')"><img name="Ggeo411" align=Top src="images/business_specialist0002.gif" alt="" border=1 width="117px" height="90px"></a><br>
			
		 Preview 2 : 
  <!--<a href="#" onClick="MM_openBrWindow('prew3.php?id=<? print($id);?>','','scrollbars=yes,width=800,height=500')">--><a href="#" onClick="MM_openBrWindow('prew.php?id=<? print($id);?>&layout=9','','scrollbars=yes,width=800,height=500')"><img name="Ggeo411" align=Top src="images/mechanic_resume.gif" alt="" border=1 width="117px" height="90px"></a><br>
  
          <!--  Preview 3 : <a href="#" onClick="MM_openBrWindow('prew2.php?id=<? print($id);?>','','scrollbars=yes,width=800,height=500')"><img name="Ggeo411" align=Top src="images/sample2.gif" alt="" border=1 width="117px" height="90px"></a>-->
		</b>
		<?  } ?>
		</td>
	  
	  
	  
	  
        <td height="167" style="border-left:#FFFFFF 3px solid; padding-left:5px; border-right:#FFFFFF 3px solid;" valign="top">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="9%" colspan="2" height="28" align="left" class="style5">&gt;&gt; <strong>
					 <? $sql2="select * from tlbuserinfo where u_id='" .$id. "' and (join_status='Y' or both_status='Y') and (resume_type='RESUME' or both_type='BOTH')" ;  
         $result2 = mysql_query($sql2,$cn) or handle_mysql_query($sql2,mysql_errno(),mysql_error());
		  $num=mysql_num_rows($result2);
          if($num == 0)						
{  
			?>	  
				
		 <b>
		 <u>Your Resume is 100% Complete, Please Make Payment.</u>
		</b>
		<?  } Else
		{?>
		<b><u>	Your Resume is Complete please click A PREVIEW button below to view your Resume.</u></b>
        <?  } ?>    
		</strong></td>
          </tr>
          <tr>
            <td colspan="2"><div align="center">
              <div align="center"><font color="#FF0000"><? ?></font> </div>
            </div></td>
          </tr>
		  <tr>
            <td height="28" colspan="2" class="body" >
			   <? $sql2="select coverletter_status,both_status from tlbuserinfo where u_id=".$id;
				 $result2 = mysql_query($sql2) or die(mysql_error());
				  $rsqry=mysql_fetch_object($result2);
				  
				  if($rsqry->coverletter_status=='Y' || $rsqry->both_status=='Y')
				  {
				?>
				 <B>Congratulations, Your Resume is Ready<br>Now, complete a <a href="view_letter1.php?id=<? print($id) ?>">Cover Letter !</a></B> 
				
				<? }   else   { ?>
				
				    
					
					
					
					
					
					
					
				 <?  } ?>
 
			</td>
          </tr>
		  </table>
	   	  <?
 $sql2="select * from tlbuserinfo where u_id='" .$id. "' and (join_status='Y' or both_status='Y') and (resume_type='RESUME' or both_type='BOTH')" ;  
         $result2 = mysql_query($sql2,$cn) or handle_mysql_query($sql2,mysql_errno(),mysql_error());
		  $num=mysql_num_rows($result2);
          if($num == 0)						
{  
			?>	  
		 <table  width="100%" border="0" cellpadding="0" cellspacing="0">>
        <tr>
           <td height="28" colspan="2" class="body" ><br> 
		        See, wasn't that simple ?<br>
You can see your resume by clicking on any of the sample formats to the left.
 
<br><br> 
 
   Your resume is now ready and can be easily updated or changed by simply logging
    into your account. To activate your resume and receive all the powerful features
    and benefits we offer, you'll need to join the Resume Builder. For a fee of just <strong>$19.95</strong>, you'll have full access to your newly created professional
    resume. You can print it, download it to Microsoft Word, or even email it instantly to a potential
    employer. As a member, you can also post your resume on our site with your
    own exclusive website address that allows you to simply provide a link in
    an email or on your personal website where an employer can view your resume
    online 24 hours a day, 365 days a year. Your resume will also be visible to
    our network of job recruiters who are constantly on the outlook for new employees.
    <br><br>
	
	 <input name="resOptions" type="radio" class="radio" value="RESUME" style="background-color:transparent" onClick="hello();"/>
 <B>Purchase Resume &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   $19.95</B> 
      
 
	  	<br>
	<input name="resOptions" type="radio" class="radio" value="COVER LETTER"  style="background-color:transparent" onClick="hello();"/>
	 <B>Purchase Cover Letter &nbsp;&nbsp; $14.95</B> 
	
	
	<br>
	<input name="resOptions" type="radio" class="radio" value="BOTH"  style="background-color:transparent" onClick="hello();"/>
 <B>Purchase Both (Resume with Cover Letter)  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $29.95</B> 
     	  
		   </td>
        </tr>   
		   
	  <tr>
         <td height="28" colspan="2"  class="body"  >
			<B><br>
		  Get Full Access to Your Resume by Becoming a <a href="#" onClick="return activate();">Member Now !</a><br><br><br>
		  </B>
		  </td>
       </tr>  
	  <tr>
         <td height="28" width="70%" class="body"  >
			<B>  Consider these great membership benefits... </B>
			<ul>
				<li>Download right into Microsoft Word!
				<li>365 Days of Total Access to all the Features the Resume Builder offers.
				<li>Free Resume Hosting. Online Employer Access.
				<li>Quickly edit or update your resume at any time.
				<li>Print off your resume from any computer.
				<li>Choose from one of several professional template layouts instantly.
				<li>Instantly send your resume via email to anyone - anywhere.
				<li>24/7 Priority customer support
			</ul>
		  </td>
		  <td>
		     <img name="Ggeo420" Align=Top src="images/guarantee1.gif" alt="" border=0 width="200px" height="128px">
		   </td>
      </tr>  	   
	 	    
        </table> 
		<?  } else {?>
		
		<table>
		<tr>
		<td><b>
		    Preview 1 :  <!--<a href="#" onClick="MM_openBrWindow('prew.php?id=<? print($id);?>&layout=4','','scrollbars=yes,width=800,height=500')">--><a href="#" onClick="MM_openBrWindow('prew.php?id=<? print($id);?>&layout=10','','scrollbars=yes,width=800,height=500')"><img name="Ggeo411" align=Top src="images/business_specialist0002.gif" alt="" border=1 width="117px" height="90px"></a>
		<b></td><td><b>
		 Preview 2 : 
  <!--<a href="#" onClick="MM_openBrWindow('prew3.php?id=<? print($id);?>','','scrollbars=yes,width=800,height=500')">--><a href="#" onClick="MM_openBrWindow('prew.php?id=<? print($id);?>&layout=9','','scrollbars=yes,width=800,height=500')"><img name="Ggeo411" align=Top src="images/mechanic_resume.gif" alt="" border=1 width="117px" height="90px"></a><br>
  
          <!--  Preview 3 : <a href="#" onClick="MM_openBrWindow('prew2.php?id=<? print($id);?>','','scrollbars=yes,width=800,height=500')"><img name="Ggeo411" align=Top src="images/sample2.gif" alt="" border=1 width="117px" height="90px"></a>-->
		</b>
		</td>
		</tr>
		</table>
		 <?  } ?>
		
		</td>
	   </tr>
    </table></td>
  </tr>
  
</table>
		 
		 
		  
	<!--  ////////////////////////////////  End Main content ////////////////////////		-->
 
		
	   	  <?
	  //$newdate=date();     
	  $sql2="select * from tlbuserinfo where u_id='" .$id. "' and (join_status='Y' or both_status='Y') and (resume_type='RESUME' or both_type='BOTH')" ;  
         $result2 = mysql_query($sql2,$cn) or handle_mysql_query($sql2,mysql_errno(),mysql_error());
		  $num=mysql_num_rows($result2);
          if($num == 0)				
            {   			
 
			?>	  	
	<tr><td height="3" bgcolor="#FFFFFF"></td></tr>
	 <tr><td align="center" bgcolor="#FFFFFF" class="bodynew" valign="middle"> <br>
	  <a href="#" onClick="activate();">Click Here To Pay Now</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 <a href="#"onClick="activate();"><img name="Ggeo423" Align=Top src="images/payment_option_logo.gif" alt="" border=0 width="198px" height="27px"></a> <br>
	 </td></tr>
	  <?  } ?>	
	 
</table>
<? include("MainBottom.php");?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
		<td><? include("footer.php");?></td>
	</tr>
</table>
 
</form>
 
</body>
</html>
 
 
 
SEND TO PAYPAL PAGE
 
<? session_start();
require_once("include/globle.php");
 
/* require_once("include/globle.php");
$sql = "update tlbuserinfo set  join_status ='C' where u_id ='".$_SESSION['userid']."'";
mysql_query($sql);
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="css.css" rel="stylesheet" type="text/css">
<script type="text/JavaScript">
<?
 
if($_POST['resOptions']=="RESUME")
{
        $sql="  select resume_type,join_status,both_status,both_type from tlbuserinfo where u_id='".$_SESSION['id']."'";
    $res=mysql_query($sql);
     while($rs=mysql_fetch_object($res))				
         {
           $join_status=$rs->join_status;
          $resume_type=$rs->resume_type;
		 $both_status=$rs->both_status;
          $both_type=$rs->both_type;
         }
		 if(($resume_type=="RESUME" && $join_status=='Y') || ($both_type=="BOTH" && $both_status=='Y'))
		 	{  ?>
		   alert("You have already paid for Resume");
		  location.href="finish.php";
		  
	       <?	
		   //exit();
		   }
	 else
	 {
		 $cost=$resume_cost;
		  
		 $item_name="Resume Activation / resumesummit.com";
		
		 $sql = "update tlbuserinfo set resume_type ='RESUME' where u_id='".$_SESSION['id']."'";
			 mysql_query($sql) or die( mysql_error() ) ;
	}
}
 
 
elseif($_POST['resOptions']=="COVER LETTER")
{     
     $sql="  select coverletter_type,coverletter_status,both_status,both_type from tlbuserinfo where u_id='".$_SESSION['id']."'";
    $res=mysql_query($sql);
     while($rs=mysql_fetch_object($res))				
         {
           $coverletter_status=$rs->coverletter_status;
          $coverletter_type=$rs->coverletter_type;
         $both_status=$rs->both_status;
          $both_type=$rs->both_type;
         }
		 if($coverletter_type=="COVER LETTER" && $coverletter_status=='Y' || ($both_type=="BOTH" && $both_status=='Y'))
		 	{  ?>
		   alert("You have already paid for Cover Letter");
		  location.href="finish.php";
	       <?	
		  
		   }
      
	     
		    $id= $_SESSION['id'];
	    
	  $cost=$coverletter_cost;
	  
	   $item_name="Cover Letter Activation / The resumesummit.com";
	   
	    $sql = "update tlbuserinfo set coverletter_type ='COVER LETTER' where u_id='".$_SESSION['id']."'";
             mysql_query($sql) or die( mysql_error() ) ;
	 
}
 
 
elseif($_POST['resOptions']=="BOTH")
{
         $sql="  select * from tlbuserinfo where u_id='".$_SESSION['id']."'";
    $res=mysql_query($sql);
     while($rs=mysql_fetch_object($res))				
         {
		   $join_status=$rs->join_status;
          $resume_type=$rs->resume_type;
           $coverletter_status=$rs->coverletter_status;
          $coverletter_type=$rs->coverletter_type;
         $both_status=$rs->both_status;
          $both_type=$rs->both_type;
         }
		 if($both_type=="BOTH" && $both_status=='Y')
		 	{  ?>
		   alert("You have already paid for Resume and Cover Letter");
		  location.href="finish.php";
	       <?	
		   //exit();
		   }
		 
           else if($resume_type=="RESUME" && $join_status=='Y' && $coverletter_type=="COVER LETTER" && $coverletter_status=='Y')
		 	{  ?>
		   alert("You have already paid for Resume and cover letter individually");
		  location.href="finish.php";
	       <?	
		   
		   }
          else if($resume_type=="RESUME" && $join_status=='Y' )
		 	{  ?>
		   alert("You have already paid for Resume so only need to pay for Cover Letter.Please select Cover Letter option either than both option.");
		  location.href="finish.php";
	       <?	
		    //exit();
		   }
		   else if($coverletter_type=="COVER LETTER" && $coverletter_status=='Y')
		 	{  ?>
		   alert("You have already paid for Cover Letter so only need to pay for Resume.Please select Resume option either than both option.");
		  location.href="finish.php";
	       <?	
		    
		   } 
 
   
		$cost=$both_cost;
		 
	    $item_name="Resume and Cover Letter Activation / The resumesummit.com";
		
		 $sql = "update tlbuserinfo set both_type ='BOTH' where u_id='".$_SESSION['id']."'";
             mysql_query($sql) or die( mysql_error() ) ;
	
}
 
 
 
   $custom=rand();
  
  $sql = "insert into paypal_info (u_id,custom_no,type) 
               values('".$_SESSION['id']."','".$custom."','".$_POST['resOptions']."')";   
mysql_query($sql);
 
?>
 
</script>
 
</head>
 
<body onLoad="document.frm1.submit();">
<table width="774" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>		<td><? include("header.php");?></td>
	</tr>
</table>
<? include("maintop.php");?>
<table  width="100%"border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td><!-- ////////////////////////////////   Main content ////////////////////////	--> 
 
		    <table width="100%" name="main" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
      <!-- //////////////////// For left panel ////////////-->
    <td width="190" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		  
		  <tr>
			<td height="100%" bgcolor="#F4F6F9">  <? include("left.php");?> </td>
		  </tr>
       </table>
	</td>
	<!-- //////////////////// End For left panel ////////////-->
	 
    <td width="580" valign="top" style="border-left:#FFFFFF 3px solid; padding-left:5px;" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
      <tr>
        <td height="167" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="9%" height="28" align="left" class="style5"></td>
            <td width="91%" align="left" class="style5">&gt;&gt; <strong>GO TO PAYPAL </strong></td>
          </tr>
          <tr>
            <td colspan="2"><div align="center">
               <table border="0" cellspacing="0" cellpadding="0">
											<tr>
												<Td align="center" class="fsx06"><b><font color="red">Please wait while the transaction proceeds.</font></b> </td>    
											</tr>
											<tr><td>
												<!-- <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" name="frm1"> -->
		 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="frm1">
		 <input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" id="business" value="<?=$buisness_id?>">
<input type="hidden" name="item_name" id="item_name" value="<?=$item_name?>">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="<?=$cost;?>">
<input type="hidden" name="custom" id="custom" value="<?= $custom;?>">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="hidden" name="return" value="http://www.resumesummit.com/thankyou.php">
<input type="hidden" name="cancel_return" value="http://www.resumesummit.com/cancelpaypal.php">
<input type="hidden" name="notify_url" value="http://www.resumesummit.com/thankyou.php">
	 </form>
				 								
												</td>
											</tr>
										</table>
            </div></td>
          </tr>
         
          
		  
          
          <tr>
            <td height="28" colspan="2">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
     
    </table></td>
  </tr>
</table>
		 
		 
		  
	<!--  ////////////////////////////////  End Main content ////////////////////////		-->
 
		</td>
	</tr>
	<tr><td height="3" bgcolor="#FFFFFF"></td></tr>
</table>
<? include("MainBottom.php");?>
<table width="774" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
		<td><? include("footer.php");?></td>
	</tr>
</table>
</body>
</html>

Open in new window

LVL 4
elliottbenzleAsked:
Who is Participating?
 
Michael701Commented:
$cost is set on lines
377 $cost=$resume_cost;
409 $cost=$coverletter_cost;
463 $cost=$both_cost;

most likely from variables set in
require_once("include/globle.php");

please post this code
0
 
mosidiotCommented:
Hey man.. the value is RESUME for the checkbox... And it's submitted to the paypal, so i guess you need to change the value from your paypal control panel page..
0
 
elliottbenzleAuthor Commented:
Great, they were all there in the include file. Thanks for taking the time to look things over.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.