Jump to content

Simple question about what php can do?


Mongrel

Recommended Posts

How in its simplest form, can be a snippet of php script be used to update the same page?
E.g. someone adds a comment to a form and the comment is added to the same page?....
is this poss..... ??? (a simple script example may be useful)

Thanks...... I'm as new as can be!!!
Link to comment
Share on other sites

Well a simple self made function would get the job done, or just php the long way. Then when they submit the comment it reload the page, switch case would be useful here, or if you really want to get advanced ajax the entire page so there is no reloading after the comment is posted (all instant)

I think that answered your question right. I had a bit of a time understanding it. If not, can you re-phrase it?
Link to comment
Share on other sites

[quote author=steelmanronald06 link=topic=107937.msg433660#msg433660 date=1158171862]
Well a simple self made function would get the job done, or just php the long way. Then when they submit the comment it reload the page, switch case would be useful here, or if you really want to get advanced ajax the entire page so there is no reloading after the comment is posted (all instant)

I think that answered your question right. I had a bit of a time understanding it. If not, can you re-phrase it?
[/quote]

Would it be poss to give me a simple example code and then I'll deconstruct it and play around with it until I'm satisfied.
Thanks
Link to comment
Share on other sites

haha!  http://www.hotscripts.com ;)  might wanna check the forum rules on that one. here is what I would do:

form in html that submits to either a case in the same page or a different page

wherever the form submits to insert the info from teh form into the database and then do a header redirect

redirects back to the page they just left with their comment on it.

check that link I gave you above...except look for shoutbox.  shoutbox is exactly what you want to do, it sounds like, just by a different name.
Link to comment
Share on other sites

[quote author=steelmanronald06 link=topic=107937.msg433665#msg433665 date=1158172884]
haha!  http://www.hotscripts.com ;)  might wanna check the forum rules on that one. here is what I would do:

form in html that submits to either a case in the same page or a different page

wherever the form submits to insert the info from teh form into the database and then do a header redirect

redirects back to the page they just left with their comment on it.

check that link I gave you above...except look for shoutbox.  shoutbox is exactly what you want to do, it sounds like, just by a different name.
[/quote]

Thanks:
First rule of programming - exact syntax is important! Check with a magnifying glass every word, letter and symbol and that includes FORUM RULES.... oops!!!



Anyway, I'll check out your link......  thanks...
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.