This content has been marked as final. Show 10 replies
The problem is with the server side script http://www.grammarperfection.com/checkout.php.
In order to be of any help, you would need to provide the code for that page. The easiest way is to copy the page to a new page with a .txt extension and provide the url. Make sure you remove any confidential information.
>Here is the complete HTML code for this page.
How are you populating the values in that page that were passed from the form? Since this is a php page, I assumed you are using php, yet there is no php script in the code you pasted. There is also no client side scripting to populate the values. In other words, there is nothing in your code that would allow this to work. Values from forms are passed to the page specified in the form's action, but it is up to you to write a script that processes those values. Please correct me if I have missed something obvious in your code.
I am using the code from another website which I will be modifying later on after I get it working for my use. Looking at this code, do you see what you the php script, or the client side scripting to populate the values?
I'm sorry if I am asking for a lot, but I am fairly new to this.
>I am using the code from another website which I will be modifying later on after I get it working for my use.
That code also does not contain anything that would populate the fields with values from another page. How are you getting the source code you are using? Do you have access to the files? If these are dynamic pages and you are copying the source code from the browser, then you will not be obtaining the script, as server side scripting is not sent to the browser. Do you have access to the source files where this is actually working?
The only code I am using is the code that I copied from the browser. I changed the urls to my own. Is this source code difficult to write? Do you have any advice on where I can go to find code for my use?
Again, thanks for your advice. It has been invaluable as most of this has been like Egyptian to me, but I have been working on my site almost daily for a while now.
>The only code I am using is the code that I copied from the browser.
Where did you get the code from? Do you have a url?
The code came from http://www.proofmydoc.com/proofmydoc.php. So far the only things I have changed are to replace my own urls in the code to make the pages change to my own when clicking "proceed with order." Once I get the basic code working properly, I will change the look and feel of the page to match my own page.
Here is my website with the code inputted http://www.grammarperfection.com/checkout.php
Note: One part of the code is working properly which put the number of words into the url. On the previous page, http://www.grammarperfection.com/cost.html, if I put in a document that is 173 words long and click "quick checkout," it puts 173 in the url ( http://www.grammarperfection.com/checkout.php?serv=1&words=173) but not on the page where I need it.
in the page code that causes that to happen.
var numWords = document.quickcalculator.txtWordCount.value;
var checkoutUrl = "/checkout.php?";
window.location.href = checkoutUrl + "serv=" + serviceOption +
"&words=" + numWords;
downloaded from the server and your browser makes it work.
More to the point, you can see it in the page code the server downloads so
it's included when you view source and copy.
PHP is a server side language.
There is PHP code in the checkout page that the owner uploaded to the
That code is what takes the URL parameter (the 173 in your example) and uses
The trouble is, all of that happens on the server and not the page in your
When the server downloads the checkout page to your browser, it doesn't
download the PHP code in it. Just the HTML.
You are not seeing the same code the owner has in his copy of checkout.php.
On the site you got the code from, it works like this:
the page to insert the 173 into the URL and then sends a command to the
server to download the checkout page to your browser.
However, before the server downloads the checkout page for you to see, the
PHP code in that page tells the server to do something.
It tells it to add the 173 to the HTML in the checkout page, and then it
downloads the page to your browser without any of the PHP code.
In other words, the page you copied is very different than the owner's page
on the server.
You can't get the page with the PHP in it unless you ask the owner to send
you a copy.
You'll need to insert your own PHP into the checkout page you made that will
tell the server to grab the 173 from the URL and insert it into the HTML
before sending the page to the browser for your visitors to see.
"SeanWoods" <email@example.com> wrote in message
> The code came from http://www.proofmydoc.com/proofmydoc.php. So far the
> things I have changed are to replace my own urls in the code to make the
> change to my own when clicking "proceed with order." Once I get the basic
> working properly, I will change the look and feel of the page to match my
> Here is my website with the code inputted
> Note: One part of the code is working properly which put the number of
> into the url. On the previous page,
> http://www.grammarperfection.com/cost.html, if I put in a document that is
> words long and click "quick checkout," it puts 173 in the url
> ( http://www.grammarperfection.com/checkout.php?serv=1&words=173) but not
> on the
> page where I need it.
Excellent explanation! Thanks for all the details. Now I am starting to get it. My target launch date for the website is June 1st. Hopefully I can get this all sorted out by then :)
I set up a merchant account with PayPal which will allow me to accept credit cards, that will be my next step.