Previewing input in browser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
niekerk
Forum Newbie
Posts: 9
Joined: Fri Sep 26, 2003 11:20 am

Previewing input in browser

Post by niekerk »

Hi everyone,

I am trying to implement a function similar to the Preview button we have on the "post new topic" page of this forum whereby data entered by user can be previewed (on the same page) before submitting.
Any suggestions are welcome!
Thanks
Niekerk
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

or using the switch function ;)
evilMind
Forum Contributor
Posts: 145
Joined: Fri Sep 19, 2003 10:09 am
Location: Earth

Post by evilMind »

switch isn't a *function* it's a control structure.
switch ( $variable) {}
or
switch ( $variable ):
....
endswitch;
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

ooops! :( sorry for wrong word to explain ;) but i think everybody understand what i meant.
niekerk
Forum Newbie
Posts: 9
Joined: Fri Sep 26, 2003 11:20 am

Post by niekerk »

Thanks to all the contributors to this thread so far.

What i am trying to do is to pass the text entered into the textarea to a script that formats the text (i have this script) and then displays it with a chance for the user to edit or submit
User avatar
mrvanjohnson
Forum Contributor
Posts: 137
Joined: Wed May 28, 2003 11:38 am
Location: San Diego, CA

Post by mrvanjohnson »

Depending on the implmentation, I usually send people to a "confirm" page. They submit the data, go to a confirm page and see the data formatted as it will be durning the output and then confirms that entry or edits it. This also gives me level one of data validation to make sure they inputed all the correct data. Edit takes them back to the form with the fields populated with their information. Confirmig the page sends it back through data validation then INSERTs or UPDATEs the database. Simple and works well. Requires an extra click or two but no real additional typing.
Post Reply