Jump to content

zzdave

Members
  • Posts

    20
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

zzdave's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you Mac. All I want to do is run a few simple scripts in my browser as shown in the book I have. The php scripts are set in an HTML page <html> <head> <title> My simple script </title> </head> <body> <?php if this = that do this etc ?> </body> </html> I didn't want to have to do a full wamp installation for this so looking for an alternative Thanks for your help I will attempt to work on it. Dave
  2. Do I HAVE to install Apache or does IIS do the same thing? Do I HAVE to install MySQL if I don't want to do database stuff? Having unzipped the PHP file and told IIS where to find php.exe nothing is working. A little help would be appreciated - I seem to have wandered into an alternate universe here. LOL
  3. Hi I have Windows XP SP3 running IIS 7.5 Express. I have downloaded "php-5.4.13-nts-Win32-VC9-x86.zip" and unzipped it to F: \php. Do I need anything else to run html scripts with php scrips embedded inside? I'm sorry if this has been done before, but there seems to be so many versions of everything and many other programs mentioned (MySQL. Apache, Windows Server etc) I want to learn the php programming language and run a few simple scripts using Internet Explorer 8. I am using a book to do this. Any help much appreciated - I am really confused. Thanks Dave
  4. IT WORKS, IT WORKS, IT WORKS Thank you thank you thank you - I feel a right idiot not understanding that you needed me to change the .html extension to .php. It works a treat now - thank you everyone - especially Fortnox - for your patience and help I really appreciate Thank you again Dave PS I will read the tutorial...
  5. Thanks very much for your help Fortnox, you've been brilliant. For the life of me I can't get it to work. I have embedded this code in an html page but it should still work I reckon. I dunno.... I don't even understand your last post, why would that code help? Oh well - better start on a plan be or use the javascript and take a punt that people have it enabled it. Cheers Dave
  6. In the middle of downloading xampp but changed the code and published it anyway http://chiswickrestaurants.com/page9.html What do you think? Dave
  7. Hi I did a cut and paste of your code (thanks by the way) and get this: http://chiswickrestaurants.com/page9.html Am I being really stupid with this? Cheers Dave
  8. Hi, OK I hear what you are saying and thank you very much for the snippets, but leaving aside the uniqueness for a second why doesn't this work: <?php srand ((double) microtime( )*1000000); $random_number = rand( ); ?> <form action = "https://secure.metacharge.com/mcpe/purser" method = "post"> <input type = "hidden" name = "intTestMode" value = "1"> <input type = "hidden" name = "intInstID" value = "<?php= $random_number; ?>"> <input type = "hidden" name = "strCartID" value = "YourOrderId/userId/987654321"> <input type = "hidden" name = "fltAmount" value = "29.99"> <input type = "hidden" name = "strCurrency" value = "GBP"> <input type = "hidden" name = "strDesc" value = "description of purchase"> <input type = "submit" value = "Make Payment"> </form > This : <?php= $random_number; ?> appears in the form field. See http://chiswickrestaurants.com/buynow.html Is it because the server does not in fact support PHP despite what they tell me? Cheers Dave
  9. Hi Sorry if I am being a bit thick here but but surely this: <?php srand ((double) microtime( )*1000000); $random_number = rand( ); ?> does use the proper tags. Are you saying there should also be a <?php tag INSIDE the field line : "intInstID" value = "<?php= $random_number; ?>"> here? Thanks Dave
  10. Hi This appears in the field: <?= $random_number; ?> not the expected generated number. In addition I only need 6 numbers in the box when it works Thanks Dae
  11. Hi, Disabled javascript !!! I hadn't thought of that - bummer. Even if they do have it enabled "check your spelling" - thanks for the heads up. I am only expecting around 5 to 10 sales a day so I reckon random is good enough, unless someone can supply code that makes it truly unique. OK - so I decide to use PHP as its not client dependant and my server is PHP enabled. The bit of code still doesn't work - here it is again: <?php srand ((double) microtime( )*1000000); $random_number = rand( ); ?> <form action = "https://secure.metacharge.com/mcpe/purser" method = "post"> <input type = "hidden" name = "intTestMode" value = "1"> <input type = "hidden" name = "intInstID" value = "<?= $random_number; ?>"> <input type = "hidden" name = "strCartID" value = "YourOrderId/userId/987654321"> <input type = "hidden" name = "fltAmount" value = "29.99"> <input type = "hidden" name = "strCurrency" value = "GBP"> <input type = "hidden" name = "strDesc" value = "description of purchase"> <input type = "submit" value = "Make Payment"> </form > What's wrong with this - why doesn't it work and can I limit it to 6 digits? Thanks Dave
  12. Hi This number is not for VAT. It is supposed to be a unique order number for the benefit of Paypoint. I have found a solution using javascript: <html> <head> </head> <body> <form> <input type="text" name="MyField" /> </form> <script langueage="javascript" type="text/javascript"> var d = new Date(); var tm = d.getTime(); document.getElementsByName('MyField')[0].value=tm; </script> </body> </html> My only problem now is to limit the number to only 6 digits. I realise this is a PHP forum so I apologise for this posting in advance. I called the hosting company earlier and they tell me their server does indeed use php so I am at a loss to understand why the earlier php script does not work. I really appreciate the assistance you guys have given me and I am learning a lot. Any further help you can offer would be great Thank you David
  13. I have uploaded the website to my server and the code still appears in the box. http://chiswickrestaurants.com/page9.html I imagine that my web host does not support php. I will call them on Monday to confirm this and then follow up here to let you know. Thanks for you help, it's been great. Dave
  14. Hi, I am using a package called Serif WebPlus. This has an option to preview pages in a browser. When I do this, its only this code appears in the text box: <?php echo $random_number; ?> My full code(cut and pasted from my browser) now reads as follows: <!-- Header Code --> <!--Header code for HTML frag_5 --> <!-- Body Code --> <!-- HTML frag_5 --> <!--Preamble--> <div style="position:absolute; left:127px; top:295px; width:855px; height:489px; /*MainDivStyle*/" __AddCode="here"> <!--MainDivStart--> <div id="frag_5" style="text-align:left; /*Tag Style*/" __AddCode="here"> <?php srand ((double) microtime()*1000000); $random_number = rand(); ?> <form action = "https://secure.metacharge.com/mcpe/purser" method = "post"> <input type = "hidden" name = "intTestMode" value = "1"> <input type="text" name="intInstID" value="<?php echo $random_number; ?>" /> <input type = "hidden" name = "strCartID" value = "YourOrderId/userId/987654321"> <input type = "hidden" name = "fltAmount" value = "39.99"> <input type = "hidden" name = "strCurrency" value = "GBP"> <input type = "hidden" name = "strDesc" value = "description of purchase"> <input type = "submit" value = "Make Payment"> </form> </div></div> <!--Postamble--> Thanks to everyone for your help and I hope this problem can be soleved Dave
  15. Hi, Still shows code in the box: <?php srand ((double) microtime( )*1000000); $random_number = rand( ); ?> <form action = "https://secure.metacharge.com/mcpe/purser" method = "post"> <input type = "hidden" name = "intTestMode" value = "1"> <input type = name = "intInstID" value = "<?php echo $random_number; ?>"> <input type = "hidden" name = "strCartID" value = "YourOrderId/userId/987654321"> <input type = "hidden" name = "fltAmount" value = "39.99"> <input type = "hidden" name = "strCurrency" value = "GBP"> <input type = "hidden" name = "strDesc" value = "description of purchase"> <input type = "submit" value = "Make Payment"> </form> Cheers Dave
×
×
  • 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.