Re: [PHP] displaying form data
On Friday, April 12, 2002, at 08:23 AM, John P. Donaldson wrote: > I have a form processor that displays a confirmation > screen showing the submitted form values to the user > after they submit the form. This confirmation > screen's contents are generated by the script itself. > However, I'd like to be able to redirect the results > to any pre-existing webpage. For example, if the form > had a field named "Name," I'd like to have the value > of that displayed in an webpage after they submit it. > I tried doing this by including the field name $Name > in the webpage, having the form processor read this > webpage in using fread, then printing it out from the > script, but the page renders without the value of > $Name. How can I do this? Sounds like you want to do a str_replace(). The template system I use works in this fashion -- I have a template HTML page, with certain keywords of the form {{{NAVIGATION}}}, {{{STYLESHEET}}}, {{{FOOTER, etc. I have a class that I wrote which simply takes the values of the variables in my page and swaps them in for the appropriate keyword -- thus, if my nav column was contained by a variable called $navigation_column, then my class would do something like: $template_page = "./includes/site_template.inc"; str_replace("{{{NAVIGATION}}}", $navigation_column, $template_page); This is oversimplified and wouldn't really work (you need to read the template page into a file handle, etc) but demonstrates the theory. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] displaying form data
At 12.04.2002 05:23, you wrote: > >I have a form processor that displays a confirmation >screen showing the submitted form values to the user >after they submit the form. This confirmation >screen's contents are generated by the script itself. >However, I'd like to be able to redirect the results >to any pre-existing webpage. For example, if the form >had a field named "Name," I'd like to have the value >of that displayed in an webpage after they submit it. >I tried doing this by including the field name $Name >in the webpage, having the form processor read this >webpage in using fread, then printing it out from the >script, but the page renders without the value of >$Name. How can I do this? >Any help would be greatly appreciated. > >Thanks, >John I hope I understand your problem, you have the values you got from the confirmation page stored in a file? And you want them to display in another page. In the file, the values are stored like $Name="foo"; $adress="Footown"; you read the data using fopen(), fread(). Then you have to use eval() ta make this text "real vars". But I wonder how you know which user is Name, and therefor displaying the corect data to her/him. Maybe you want to do this with a cookie(), or session() methods, wich are covered endless in this list. HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] displaying form data
I have a form processor that displays a confirmation screen showing the submitted form values to the user after they submit the form. This confirmation screen's contents are generated by the script itself. However, I'd like to be able to redirect the results to any pre-existing webpage. For example, if the form had a field named "Name," I'd like to have the value of that displayed in an webpage after they submit it. I tried doing this by including the field name $Name in the webpage, having the form processor read this webpage in using fread, then printing it out from the script, but the page renders without the value of $Name. How can I do this? I know I can do this by including the HTML code to output within the script, but I need the webpage that displays the data to be an external file. Any help would be greatly appreciated. Thanks, John __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php