Jump to content

Recommended Posts

Hi.  My first post on here so sorry if this all sounds a bit daft.

 

Have a PHP file to take the name and address details etc from a form and then e-mail to me and the customer.  It then takes the customer on to PayPal for payment etc.

 

The PHP works fine when it's hosted by GoDaddy, now I'm trying to host it with Freeparking it doesn't work.  The obvious thing to me is that the PHP is fine (as it works with GoDaddy), I've put in a Support request with Freeparking but I'm sure they'll come back saying it's not them it's my PHP.

 

Should it be different for different hosting companies?

 

Thanks in advance for any help you cna give me.

Show us your code.

Most common reason for such problems is that some script rely on enabled register_globals. The thing is, this setting is unsafe, and more and more hosting companies disable it (and good thing they do!).

Hi, thanks for the reply.  In don't know what that means, but here's the code.  There's a lot, hope that's ok.

 

<?

 

 

echo "<font face='Tahoma'>Please wait collectmyparcel.com is processing your booking ....</font>";

 

 

 

 

 

$enquiry_email = "support@collectmyparcel.com";

 

$email = "bookings@collectmyparcel.com";

 

$sitename = "collectmyparcel.com";

 

 

 

 

 

$xheaders .= "From: collectmyparcel.com <".$enquiry_email.">\n";

 

$xheaders .= "X-Sender: <".$enquiry_email.">\n";

 

$xheaders .= "X-Mailer: PHP\n"; // mailer

 

$xheaders .= "X-Priority: 3\n"; // Urgent message!

 

$xheaders .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type

 

 

 

 

 

$xheaders .= "Bcc: bookings@collectmyparcel.com , bookings@collectmyparcel.com \n";

 

$message='<FONT SIZE=5 FACE="ARIAL">

<p><div align="center"><img src="http://www.collectmyparcel.com/images/indexlogotop.jpg" width="558" height="93"></p>

  <p class="style48">Booking Form Confirmation - DHL@Home 48</p></FONT>

<FONT SIZE=1 FACE="ARIAL"> 

<table width="929" align="center">

      <tr bordercolor="#003300">

        <th width="304" scope="row"><div align="left"><span class="style42">Collection Date</span></div></th>

        <td width="165"><div align="left"><span class="style46">

            '. $_REQUEST["date"] .'

        </span></div></td>

        <td colspan="3"><span class="style47"></span></td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"></div></th>

        <td><span class="style47"></span></td>

        <td colspan="3"><span class="style47"></span></td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"><span class="style42">E-Mail address</span></div></th>

        <td>

          <div align="left">

            '. $_REQUEST["email"] .'

          </div></td>

        <td colspan="3"><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span></td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"><span class="style42">Collection Name</span></div></th>

        <td><div align="left">

          '. $_REQUEST["coll_name"] .'

        </div></td>

        <td width="114" rowspan="8"><div align="left"><img src="http://collectmyparcel.com/images/arrow.jpg" width="93" height="60"></div></td>

        <td width="292"><div align="left"><span class="style47"><B>Delivery Name</B></span></div></td>

        <td width="150">'. $_REQUEST["1del_name"] .'</td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"><span class="style42">Collection Company</span></div></th>

        <td><div align="left">

          '. $_REQUEST["coll_comp"] .'

        </div></td>

        <td><div align="left"><span class="style50"><B>Delivery Company</B></span></div></td>

        <td>'. $_REQUEST["1del_comp"] .'</td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"><span class="style42">Collection Address 1</span></div></th>

        <td><div align="left">

          '. $_REQUEST["coll_add1"] .'

        </div></td>

        <td><div align="left"><span class="style50"><B>Delivery Address 1</B></span></div></td>

        <td>'. $_REQUEST["1del_add1"] .'</td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"><span class="style42">Collection Address 2</span></div></th>

        <td><div align="left">

          '. $_REQUEST["coll_add2"] .'

        </div></td>

        <td><div align="left"><span class="style50"><B>Delivery Address 2</B></span></div></td>

        <td>'. $_REQUEST["1del_add2"] .'</td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"><span class="style42">Collection Town / City</span></div></th>

        <td><div align="left">

          '. $_REQUEST["coll_town"] .'

        </div></td>

        <td><div align="left"><span class="style50"><B>Delivery Town / City</B></span></div></td>

        <td>'. $_REQUEST["1del_town"] .'</td>

      </tr>

  <tr bordercolor="#003300">

        <th scope="row"><div align="left"><span class="style42">Collection County </span></div></th>

        <td><div align="left">

          '. $_REQUEST["coll_county"] .'

        </div></td>

        <td><div align="left"><span class="style50"><B>Delivery County</B></span></div></td>

        <td>'. $_REQUEST["1del_county"] .'</td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"><span class="style42">Collection Post Code</span></div></th>

        <td><div align="left">

          '. $_REQUEST["coll_postcode"] .'

        </div></td>

        <td><div align="left"><span class="style50"><B>Delivery Post Code</B></span></div></td>

        <td>'. $_REQUEST["1del_postcode"] .'</td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"><span class="style42">Collection Phone No</span></div></th>

        <td><div align="left">

          '. $_REQUEST["coll_phone"] .'

        </div></td>

        <td><div align="left"><span class="style50"><B>Delivery Phone No</B></span></div></td>

        <td>'. $_REQUEST["1del_phone"] .'</td>

      </tr>

      <tr bordercolor="#003300">

        <th scope="row"><div align="left"></div></th>

        <td><div align="left"><span class="style46">

        </span></div></td>

        <td colspan="3"> </td>

      </tr>

      <tr>

        <th scope="row"><div align="left"></div></th>

        <td><div align="left"><span class="style47"><span class="style46">

        </span></span></div></td>

        <td colspan="3"><span class="style47"></span></td>

      </tr>

      <tr>

        <th scope="row"><div align="left"></div></th>

        <td><div align="left"><span class="style47"></span></div></td>

        <td colspan="3"><span class="style47"></span></td>

      </tr>

      <tr>

        <th scope="row"><div align="left"><span class="style42">Parcel Weight</span></div></th>

        <td><div align="left"><span class="style47">

            '. $_REQUEST["1parcel_weight"] .'

        </span></div></td>

        <td colspan="3"><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span></td>

      </tr>

      <tr>

        <th scope="row"><div align="left"><span class="style42">Parcel Dimensions</span></div></th>

        <td colspan="4"><div align="left"><span class="style46">

              '. $_REQUEST["1parcel_length"] .'

              cm x

              '. $_REQUEST["1parcel_height"] .'

              cm x

              '. $_REQUEST["1parcel_width"] .'

            cm </span></div></td>

      </tr>

      <tr>

        <th scope="row"><div align="left"><span class="style42">Value</span></div></th>

        <td><div align="left"><span class="style47">

            '. $_REQUEST["1parcel_value"] .'

        </span></div></td>

        <td colspan="3"> </td>

      </tr>

      <tr>

        <th scope="row"><div align="left"><span class="style42">Description</span></div></th>

        <td><div align="left"><span class="style47">

            '. $_REQUEST["1parcel_desc"] .'

        </span></div></td>

        <td colspan="3"> </td>

      </tr>

    </table></FONT>';

 

 

 

 

$mail_sent = mail($email, "Booking Form - 24-48 Hr 1-2 Day Delivery", $message, $xheaders);

 

 

 

 

 

 

 

 

 

$mail_sent = mail($_REQUEST["email"], "Confirmation of Booking - 24-48 Hr 1-2 Day Delivery", $message, $xheaders);

 

 

 

 

 

 

 

 

 

 

 

 

 

$counter =  $_REQUEST["1"];

 

 

 

$price = 8.75;

 

 

 

?>

 

 

 

 

 

 

 

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="form_payapl">

 

 

 

 

 

 

 

 

 

<input type="hidden" name="cmd" value="_xclick">

 

<input type="hidden" name="business" value="paypal@collectmyparcel.com">

 

 

 

<input type="hidden" name="currency_code" value="GBP">

 

 

 

 

 

<input type="hidden" name="return" value="http://www.collectmyparcel.com/thankyou_booking.html">

 

<input type="hidden" name="cancel_return" value="http://collectmyparcel.com/services.html">

 

 

 

 

 

 

 

<input type="hidden" name="amount" value="<? echo ($price); ?>">

 

<input type="hidden" name="item_name" value="DHL48 - Parcel Booking for 1 Address">

 

 

 

 

 

 

 

</form>

 

 

 

<script>

 

form_payapl.submit();

 

</script>

It says 'The link you have used to enter the PayPal system contains an incorrectly formatted item amount.'

 

I never worked with PayPal integration, but in your form there is no information about item amount?

 

[edit]

 

Ahh.. let's see what we have here

 

<input type="hidden" name="amount" value="<? echo ($price); ?>">

 

You have to change <? here to <?php as well (and all other occurences of <? as well)

You're good!

 

Now the PayPal part works perfectly.  I am impressed!

 

Now, my new friend :-)

 

All I seem to be missing now is getting the info sent to the customers e-mail and to my e-mail.

 

Fingers crossed you can help me here too.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.