[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 10-22-2006, 02:07 AM   #1 (permalink)
NamePros Member
 
Join Date: Mar 2004
Posts: 39
50.00 NP$ (Donate)

jecn100 is an unknown quantity at this point


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
jecn100 is offline  
Old 10-23-2006, 06:35 AM   #2 (permalink)
NamePros Member
 
sote's Avatar
 
Join Date: Jul 2006
Posts: 70
13.20 NP$ (Donate)

sote will become famous soon enoughsote will become famous soon enough


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>
3. Add <form action="order-form.php"> before the 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>
6. Replace it with:
Code:
<input type="submit" value="Complete your booking - Next Step">
7. "index.htm" is done. Now open "order-form.php"
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;
?>
9. Replace the following code:
Code:
<b>£50.50</b>
with:
Code:
<b>£<?=$cost ?></b>
10. Replace the following code:
Code:
For the <b>24 September 2006</b> to the <b>24 September 2006</b>
with:
Code:
For the <b><?=date("j F Y",$date);?></b> to the <b><?=date("j F Y",$date2);?></b>
11. Replace the following code:
Code:
<input type="hidden" name="amount" value="103.99">
with:
Code:
<input type="hidden" name="amount" value="<?=$cost;?>">
And you're done.
sote is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 11:28 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85