Re: Using echo to run separate PHP script from HTML [message #179929 is a reply to message #179925] |
Wed, 19 December 2012 21:59 |
P E Schoen
Messages: 86 Registered: January 2011
Karma:
|
Member |
|
|
"Jerry Stuckle" wrote in message news:kat6lp$vdt$2(at)dont-email(dot)me...
> That should not make a difference. ANSI is fine. The FTP transfer should
> be text (not binary) mode, and will take care of the line end differences.
But I am editing the files on my local machine Apache server, so FTP is not
used. I'm using the evaluation version of perledit, but I think I should try
one of the other editors designed for code, such as notepad++ as suggested
by Luuk.
Now that I can get the PHP to work, I want to add some more functionality to
this. There are some widgets that are designed to handle contributions
through PayPal and other services, but I wanted to make something simple
that my friend can easily add to his forum:
http://dogsnharmony.com/community/
What I have now can be handled by simply adding the line:
<img src="goalgraph.php" alt="Help us get to our goal" />
The graph can be updated by manually uploading a new "goalgraphdata.txt"
file with the amounts on an occasional basis, although it would be nice to
see the graph update when the contribution is made. So I wanted to simulate
this by having text controls where a member can enter an amount, and then
click a "Contribute" button, and have the graph update accordingly. There
could also be another text box showing the total contributions.
But I'm not sure quite how to do this. As it is now set up, I would have to
add the new quantity, as entered in the HTML page, to the URL parameters in
the PHP code. Or I could just write the new values to the text file. But I'm
not sure how to transfer the values in the HTML controls to PHP variables to
be written to the file.
I can't find any PHP functions that would provide a listbox or textbox where
a user can enter data. Of course, I could echo an HTML input of type text,
but I'm not sure if the value is visible to PHP, as it is with JavaScript.
Maybe this requires JSON or an equivalent. Any ideas?
Thanks,
Paul
|
|
|