| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | Need Script - Will Pay Hi Guys I have just built onenavhire.com and need some help finishing it. I want the second page order-form.html to show the date the customer has put in on the home page plus show the price of the order and also take the price to the pay pal buy it now button. I will pay some one to code this via pay pal, just name ur price. Any suggestions how I would do this. Big Thanks Justin |
| |
| | #2 (permalink) |
| NamePros Member | Here's what you have to do. 1. Rename "order-form.html" to "order-form.php" 2. Look for the following table in "index.htm": Code: <table> <tr> <td class="style3" colspan="2" background="images/lineright.gif">You can now hire a top of the range Sat Nav system from Onenavhire.Com<br>for <b>just £3.99 a day</b>, making it hassle free to get to your destination.<br>All our systems come with western European mapping.<br><br><br></td></tr> <tr> <tr> <td class="style3" colspan="2" background="images/lineright.gif"><br><b>Ordering, delivery and return could not be simpler...</b><br><br><br> 1. Simple fill in the booking form below<br><br> 2. Fill in the contact information on the next page<br><br> 3. Complete the on-line payment form<br><br> 4. Receive your equipment before your hire date<br><br> 5. Repack the equipment in its original packaging and affix the returns label<br><br> 6. Return the equipment to us, via the Post Office, the day after your hire period<br><br><br><br></td></td></tr> <tr> <td colspan="2" class="style3"><b>Online Booking - To order simple enter your hire dates below</b><br><br></b></td> </tr> <tr> <td align="left" valign="middle" class="style3">Start Date ::</td><td><input onclick="ds_sh(this);" class="style3" name="date" readonly="readonly" style="cursor: text" /></td></tr> <tr> <td class="style3">End Date ::</td><td><input onclick="ds_sh(this);" class="style3" name="date2" readonly="readonly" style="cursor: text" /></td> </tr> <tr> <td class="style3" colspan="2"><b><br><a href="order-form.html" class="link2">Complete your booking - Next Step</a></b> <img src="images/aw.gif" /><br><br><br><br></td> </tr> </table> 4. Add </form> after the table. 5. Look for the following code in the table: Code: <a href="order-form.html" class="link2">Complete your booking - Next Step</a> Code: <input type="submit" value="Complete your booking - Next Step"> 8. Add the following code at the start of the page: Code: <?
$cost=0;
$d=explode("-",$_GET['date']);
$d2=explode("-",$_GET['date2']);
$date=mktime(0, 0, 0, $d[1], $d[2], $d[0]);
$date2=mktime(0, 0, 0, $d2[1], $d2[2], $d2[0]);
$cost=(($date2-$date)/86400)*3.99;
$cost+=100;
?>
Code: <b>£50.50</b> Code: <b>£<?=$cost ?></b> Code: For the <b>24 September 2006</b> to the <b>24 September 2006</b> Code: For the <b><?=date("j F Y",$date);?></b> to the <b><?=date("j F Y",$date2);?></b>
Code: <input type="hidden" name="amount" value="103.99"> Code: <input type="hidden" name="amount" value="<?=$cost;?>"> |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |