Jump to content

Archived

This topic is now archived and is closed to further replies.

Mongrel

Simple question about what php can do?

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!!!

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites
You might want to check out my comments script ... http://www.digitalmidget.com/php_noob/comment.php

It does what you ask and it's friendly and free :)

Share this post


Link to post
Share on other sites
[quote author=AndyB link=topic=107937.msg433882#msg433882 date=1158197015]
You might want to check out my comments script ... http://www.digitalmidget.com/php_noob/comment.php

It does what you ask and it's friendly and free :)
[/quote]

Thanks Andy B

Share this post


Link to post
Share on other sites

×

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.