Re: [PHP] resubmitting $POST data to another script

2004-03-03 Thread Charlie Fiskeaux II
Leif Gregory wrote:
Hello Charlie,

Tuesday, March 2, 2004, 1:54:43 PM, you wrote:
CFI I'm creating a form with 170 fields, and I'd like to create an
CFI intermediary page so the user can review their info before
CFI submitting it again to the emailing script.
Just a thought. I'm guessing you are dumping this stuff to a database
for the final result. Why don't you create an intermediate table to
hold those fields (keeping track of the record ID in a hidden input
field), then re-read that data back on the validation page, then when
they submit it there, the changes are added to the real table.
My only thinking on this is to keep it simple rather than carrying
over a ton of hidden fields. It may not be the most efficient method,
but it'd work.
I'm not dumping to a database, unfortunately, I'm just 
emailing the results. Thanks, anyway, though. I think the 
hidden fields idea is the best one; I finally found a 
solution that uses each() and list() to travel the $_POST 
array, and I think it will work nicely.

Thanks to all for your responses!

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] resubmitting $POST data to another script

2004-03-03 Thread Charlie Fiskeaux II
Chris Shiflett wrote:

You might strongly consider using foreach() instead for reasons of
performance (1000% or more faster):
http://www.blueshoes.org/en/developer/php_bench/

You could simply:

foreach ($_POST as $name = $value)
{
   ...
}
Hope that helps.
Sure does, thanks!

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] resubmitting $POST data to another script

2004-03-02 Thread Charlie Fiskeaux II
I'm creating a form with 170 fields, and I'd like to create 
an intermediary page so the user can review their info 
before submitting it again to the emailing script.

Since the form has so much data, I was hoping I could just 
take the entire $POST array and pass it to the emailing 
script like an HTML form POST method (so that form A sends 
its data via POST to PHP script B, which displays it for 
review; upon successful review, the user clicks Submit again 
to pass the $POST data on to Perl script C, which is 
prewritten). Is this possible?

I looked in the PHP Manual but couldn't find anything; I'm 
having a difficult time finding stuff in there, since I have 
to know what category a function falls under before I can 
look it up.

Thanks.

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] resubmitting $POST data to another script

2004-03-02 Thread Charlie Fiskeaux II
Jay Blanchard wrote:

When you create the view page store all of the passed variables in
hidden form fields. That way they can then be submitted on to the next
script.
I could do it that way, but I was hoping for a way of just 
passing all the data at once; Since there's 170 fields, 
that's a lot of data to manually handle.

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] saving form data - calling another script from PHP?

2004-02-24 Thread Charlie Fiskeaux II
Gary Sanders wrote:

Charlie,

Can you make the submit target be the PHP script and have the PHP script
call the Perl script to send the email?
Sure, that would definitely work; I just don't know how to 
call the Perl script and pass the data (and 
uploaded/attached files) to it.

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] saving form data

2004-02-23 Thread Charlie Fiskeaux II
I'm using a prebuilt Perl form mailer script for a project, 
but because the form is so long, my client would like to 
give the user the ability to save the data and come back to 
finish it later. I was hoping to be able to code this part 
in PHP (because I don't know Perl), but I'm fairly new to 
PHP and don't know how to get one form to go to two 
different places. Because the target of the form is the Perl 
script (for emailing the submitted form), how can I grab the 
data from the form with PHP?

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] saving form data

2004-02-23 Thread Charlie Fiskeaux II
Sam Masiello wrote:

If the PHP configuration doesn't have register_globals turned on in
the php.ini file, you will be able to access the form variables via the
_POST array like this:
$_POST[my_form_var]

Of course, substitute my_form_var with the correct variable from the
form that you are submitting.
If the server does have register_globals turned on you can access the
variables just as they are named in the form.  For example, if you have
a text input field named lastname, you can access the value in that
text box using the variable $lastname.
Thanks, but how do I get the info submitted to the PHP 
script to access the data in the first place? Since the 
target of the form is the Perl script, the submit button 
submits the form to the Perl script; can I add a second 
button of some type to submit the form to a different 
location (the PHP script)? Or can I use the DOM (ie 
document.formname.fieldname.value) to grab the data straight 
from the fields and then pass it on somehow?

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] saving form data

2004-02-23 Thread Charlie Fiskeaux II
Richard Davey wrote:

You can't make one form submit to two different scripts sadly, but to
be honest if you're going to write a PHP script to capture this
information - why not make it do what the Perl formmail script does
too? (i.e. send the email) and remove the Perl script from the
equation?
It's just a matter of development time; if there's a way to 
use the Perl mail script with a PHP data saving script, it 
would save time. If I do have to rewrite the whole thing in 
PHP, how would I accept uploaded file attachments and attach 
them to the emailed form results?

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] saving form data

2004-02-23 Thread Charlie Fiskeaux II
Richard Davey wrote:

CFI It's just a matter of development time; if there's a way to 
CFI use the Perl mail script with a PHP data saving script, it 
CFI would save time. If I do have to rewrite the whole thing in 
CFI PHP, how would I accept uploaded file attachments and attach 
CFI them to the emailed form results?

Then how about in reverse? Add something to the end of the Perl script
that passes the values to a PHP script? It could even do it via the
query string, maybe also passing an md5 encoded password that only
your two scripts know (in order to stop someone spoofing your script).
I don't think that would work because they will need to save 
without sending the form. But I had thought about the 
reverse: a PHP script that saves the data and then possibly 
passes it on to the Perl script.

Do you or anyone else know how to pass on form results in 
PHP to another script? (Like I said, I'm pretty new to PHP...)

Thanks!

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
859/858-9054x29
cell: 859/608-9194
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] creating a very simple cms with one login and one mySQL database

2003-12-30 Thread Charlie Fiskeaux II
I'm new to php and am trying to create a very basic content 
management system to let my client update a popup on their 
homepage. I'm using mySQL and have a good idea of how to do 
the login and set  read cookies, as well as accessing the 
database during the admin process.

The part I'm not too clear on is how to implement the front 
end for the general users. When someone visits the site and 
the popup pops up, what happens on that page? Does it access 
the database at the time it loads to load the information? 
If so, is this possible without hardcoding the 
username/password information (to access the database) in 
the popup page code?

Is there a tutorial or article on stuff like this somewhere?

--

Charlie Fiskeaux II
Media Designer
Cre8tive Group
cre8tivegroup.com
859/858-9054x29
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php