Page 1 of 1

help making a paypal form...

Posted: Thu May 19, 2005 8:50 am
by Smackie
I'm working on a my website where I sell hosting and domains and I was wondering if someone could help me with a few codes for it.. I want to make a form that will send a pm to me and send a email to the person that signed up for the account and i got that stuff done already but i want it where they have to send the money to paypal.. here is the codes i got right now... and i want it when someone clicks one of the plans it will show at the end how much it is and i want to make it where they can select how they want to pay like monthly or every 6 months or yearly.. (and still add on there)

signup.php

Code: Select all

<SCRIPT LANGUAGE=&quote;JavaScript&quote;> 

    function validateForm() 
    { 
        formObj = document.form; 
        if (formObj.name.value == &quote;&quote;) 
        { 
            alert(&quote;You have not entered your name.&quote;); 
            formObj.name.focus(); 
            return false; 
        } 
        else if (formObj.email.value == &quote;&quote; || (!/^(\w&#1111;-._\w]*\w@\w&#1111;-._\w]*\w\.\w{2,3})$/.test(formObj.email.value))){
       alert(&quote;You have not entered a valid email address.&quote;); 
       formObj.email.focus(); 
       return false; 

        } 
            else if (formObj.domain.value == &quote;&quote;) 
        { 
            alert(&quote;You have not entered whether or not you own a domain.&quote;); 
            formObj.domain.focus(); 
            return false; 
        } 
		else if (formObj.plan.value == &quote;&quote;) 
        { 
            alert(&quote;You have not entered which plan you want to buy.&quote;); 
            formObj.plan.focus(); 
            return false; 
        } 
		else
		{
			return true;
		}
    } 

</SCRIPT>

<form name=&quote;form&quote; action=&quote;index.php?pages=signup_parse&quote; method=&quote;post&quote; onsubmit=&quote;return validateForm()&quote;>
  <table width=&quote;63%&quote; border=&quote;0&quote; align=&quote;center&quote; cellpadding=&quote;0&quote; cellspacing=&quote;3&quote;>
    <tr> 
      <td width=&quote;55%&quote; height=&quote;22&quote;><div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Name:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;><input type=&quote;text&quote; name=&quote;name&quote; value=&quote;&quote; size=&quote;25&quote;></font></td>
    </tr>
    <tr> 
      <td height=&quote;26&quote;> <div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Email Address:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;><input type=&quote;text&quote; name=&quote;email&quote; size=&quote;25&quote;></font></td>
    </tr>
    <tr> 
      <td height=&quote;27&quote;> <div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Do you own a domain:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;>
        <select name=&quote;domain&quote;>
          <option value=&quote;&quote;>Please Choose</option>
          <option value=&quote;Yes&quote;>Yes</option>
          <option value=&quote;No&quote;>No</option>
        </select>
        </font></td>
    </tr>
    <tr> 
      <td height=&quote;14&quote;><div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Choose a Plan:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;> 
        <select name=&quote;plan&quote;>
          <option value=&quote;&quote;>Please Choose</option>
          <option value=&quote;Beginner&quote;>Beginner</option>
          <option value=&quote;Standard&quote;>Standard</option>
		  <option value=&quote;Advanced&quote;>Advanced</option>
        </select>
        </font></td>
    </tr>
    <tr> 
      <td height=&quote;25&quote; rowspan=&quote;2&quote;><div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Comments:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;> <textarea name=&quote;comments&quote; cols=&quote;19&quote; rows=&quote;5&quote;></textarea></font></td>
    </tr>
    <tr> 
      <td width=&quote;13%&quote;><input name=&quote;submit&quote; value=&quote;Submit&quote; type=&quote;submit&quote;></td>
      <td width=&quote;32%&quote;><input name=&quote;reset&quote; value=&quote;Reset&quote; type=reset></td>
    </tr>
  </table>
</form>
signup_parse.php

Code: Select all

<SCRIPT LANGUAGE=&quote;JavaScript&quote;> 

    function validateForm() 
    { 
        formObj = document.form; 
        if (formObj.name.value == &quote;&quote;) 
        { 
            alert(&quote;You have not entered your name.&quote;); 
            formObj.name.focus(); 
            return false; 
        } 
        else if (formObj.email.value == &quote;&quote; || (!/^(\w&#1111;-._\w]*\w@\w&#1111;-._\w]*\w\.\w{2,3})$/.test(formObj.email.value))){
       alert(&quote;You have not entered a valid email address.&quote;); 
       formObj.email.focus(); 
       return false; 

        } 
            else if (formObj.domain.value == &quote;&quote;) 
        { 
            alert(&quote;You have not entered whether or not you own a domain.&quote;); 
            formObj.domain.focus(); 
            return false; 
        } 
		else if (formObj.plan.value == &quote;&quote;) 
        { 
            alert(&quote;You have not entered which plan you want to buy.&quote;); 
            formObj.plan.focus(); 
            return false; 
        } 
		else
		{
			return true;
		}
    } 

</SCRIPT>

<form name=&quote;form&quote; action=&quote;index.php?pages=signup_parse&quote; method=&quote;post&quote; onsubmit=&quote;return validateForm()&quote;>
  <table width=&quote;63%&quote; border=&quote;0&quote; align=&quote;center&quote; cellpadding=&quote;0&quote; cellspacing=&quote;3&quote;>
    <tr> 
      <td width=&quote;55%&quote; height=&quote;22&quote;><div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Name:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;><input type=&quote;text&quote; name=&quote;name&quote; value=&quote;&quote; size=&quote;25&quote;></font></td>
    </tr>
    <tr> 
      <td height=&quote;26&quote;> <div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Email Address:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;><input type=&quote;text&quote; name=&quote;email&quote; size=&quote;25&quote;></font></td>
    </tr>
    <tr> 
      <td height=&quote;27&quote;> <div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Do you own a domain:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;>
        <select name=&quote;domain&quote;>
          <option value=&quote;&quote;>Please Choose</option>
          <option value=&quote;Yes&quote;>Yes</option>
          <option value=&quote;No&quote;>No</option>
        </select>
        </font></td>
    </tr>
    <tr> 
      <td height=&quote;14&quote;><div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Choose a Plan:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;> 
        <select name=&quote;plan&quote;>
          <option value=&quote;&quote;>Please Choose</option>
          <option value=&quote;Beginner&quote;>Beginner</option>
          <option value=&quote;Standard&quote;>Standard</option>
		  <option value=&quote;Advanced&quote;>Advanced</option>
        </select>
        </font></td>
    </tr>
    <tr> 
      <td height=&quote;25&quote; rowspan=&quote;2&quote;><div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Comments:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;> <textarea name=&quote;comments&quote; cols=&quote;19&quote; rows=&quote;5&quote;></textarea></font></td>
    </tr>
    <tr> 
      <td width=&quote;13%&quote;><input name=&quote;submit&quote; value=&quote;Submit&quote; type=&quote;submit&quote;></td>
      <td width=&quote;32%&quote;><input name=&quote;reset&quote; value=&quote;Reset&quote; type=reset></td>
    </tr>
  </table>
</form>
TMP2127xgpjly.htm

Code: Select all

<SCRIPT LANGUAGE=&quote;JavaScript&quote;> 

    function validateForm() 
    { 
        formObj = document.form; 
        if (formObj.name.value == &quote;&quote;) 
        { 
            alert(&quote;You have not entered your name.&quote;); 
            formObj.name.focus(); 
            return false; 
        } 
        else if (formObj.email.value == &quote;&quote; || (!/^(\w&#1111;-._\w]*\w@\w&#1111;-._\w]*\w\.\w{2,3})$/.test(formObj.email.value))){
       alert(&quote;You have not entered a valid email address.&quote;); 
       formObj.email.focus(); 
       return false; 

        } 
            else if (formObj.domain.value == &quote;&quote;) 
        { 
            alert(&quote;You have not entered whether or not you own a domain.&quote;); 
            formObj.domain.focus(); 
            return false; 
        } 
		else if (formObj.plan.value == &quote;&quote;) 
        { 
            alert(&quote;You have not entered which plan you want to buy.&quote;); 
            formObj.plan.focus(); 
            return false; 
        } 
		else
		{
			return true;
		}
    } 

</SCRIPT>

<form name=&quote;form&quote; action=&quote;index.php?pages=signup_parse&quote; method=&quote;post&quote; onsubmit=&quote;return validateForm()&quote;>
  <table width=&quote;63%&quote; border=&quote;0&quote; align=&quote;center&quote; cellpadding=&quote;0&quote; cellspacing=&quote;3&quote;>
    <tr> 
      <td width=&quote;55%&quote; height=&quote;22&quote;><div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Name:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;><input type=&quote;text&quote; name=&quote;name&quote; value=&quote;&quote; size=&quote;25&quote;></font></td>
    </tr>
    <tr> 
      <td height=&quote;26&quote;> <div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Email Address:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;><input type=&quote;text&quote; name=&quote;email&quote; size=&quote;25&quote;></font></td>
    </tr>
    <tr> 
      <td height=&quote;27&quote;> <div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Do you own a domain:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;>
        <select name=&quote;domain&quote;>
          <option value=&quote;&quote;>Please Choose</option>
          <option value=&quote;Yes&quote;>Yes</option>
          <option value=&quote;No&quote;>No</option>
        </select>
        </font></td>
    </tr>
    <tr> 
      <td height=&quote;14&quote;><div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Choose a Plan:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;> 
        <select name=&quote;plan&quote;>
          <option value=&quote;&quote;>Please Choose</option>
          <option value=&quote;Beginner&quote;>Beginner</option>
          <option value=&quote;Standard&quote;>Standard</option>
		  <option value=&quote;Advanced&quote;>Advanced</option>
        </select>
        </font></td>
    </tr>
    <tr> 
      <td height=&quote;25&quote; rowspan=&quote;2&quote;><div align=&quote;right&quote;><font size=&quote;2&quote; face=&quote;verdana&quote;>Comments:</font></div></td>
      <td colspan=&quote;2&quote;><font size=&quote;1&quote; face=&quote;Tahoma&quote;> <textarea name=&quote;comments&quote; cols=&quote;19&quote; rows=&quote;5&quote;></textarea></font></td>
    </tr>
    <tr> 
      <td width=&quote;13%&quote;><input name=&quote;submit&quote; value=&quote;Submit&quote; type=&quote;submit&quote;></td>
      <td width=&quote;32%&quote;><input name=&quote;reset&quote; value=&quote;Reset&quote; type=reset></td>
    </tr>
  </table>
</form>
Thank you
Smackie