Mongrel Posted September 13, 2006 Share Posted September 13, 2006 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 https://forums.phpfreaks.com/topic/20647-simple-question-about-what-php-can-do/ Share on other sites More sharing options...
steelmanronald06 Posted September 13, 2006 Share Posted September 13, 2006 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 https://forums.phpfreaks.com/topic/20647-simple-question-about-what-php-can-do/#findComment-91254 Share on other sites More sharing options...
Mongrel Posted September 13, 2006 Author Share Posted September 13, 2006 [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 https://forums.phpfreaks.com/topic/20647-simple-question-about-what-php-can-do/#findComment-91257 Share on other sites More sharing options...
steelmanronald06 Posted September 13, 2006 Share Posted September 13, 2006 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 pagewherever the form submits to insert the info from teh form into the database and then do a header redirectredirects 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 https://forums.phpfreaks.com/topic/20647-simple-question-about-what-php-can-do/#findComment-91259 Share on other sites More sharing options...
Mongrel Posted September 13, 2006 Author Share Posted September 13, 2006 [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 pagewherever the form submits to insert the info from teh form into the database and then do a header redirectredirects 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 https://forums.phpfreaks.com/topic/20647-simple-question-about-what-php-can-do/#findComment-91262 Share on other sites More sharing options...
AndyB Posted September 14, 2006 Share Posted September 14, 2006 You might want to check out my comments script ... http://www.digitalmidget.com/php_noob/comment.phpIt does what you ask and it's friendly and free :) Link to comment https://forums.phpfreaks.com/topic/20647-simple-question-about-what-php-can-do/#findComment-91462 Share on other sites More sharing options...
Mongrel Posted September 14, 2006 Author Share Posted September 14, 2006 [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.phpIt does what you ask and it's friendly and free :)[/quote]Thanks Andy B Link to comment https://forums.phpfreaks.com/topic/20647-simple-question-about-what-php-can-do/#findComment-91798 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.