Jump to content


Photo

Simple question about what php can do?


  • Please log in to reply
6 replies to this topic

#1 Mongrel

Mongrel
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 13 September 2006 - 06:19 PM

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

#2 steelmanronald06

steelmanronald06
  • Staff Alumni
  • Advanced Member
  • 2,004 posts
  • LocationOk

Posted 13 September 2006 - 06:24 PM

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?

#3 Mongrel

Mongrel
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 13 September 2006 - 06:33 PM

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?


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

#4 steelmanronald06

steelmanronald06
  • Staff Alumni
  • Advanced Member
  • 2,004 posts
  • LocationOk

Posted 13 September 2006 - 06:41 PM

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.

#5 Mongrel

Mongrel
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 13 September 2006 - 06:49 PM

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.


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

#6 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 14 September 2006 - 01:23 AM

You might want to check out my comments script ... http://www.digitalmi...oob/comment.php

It does what you ask and it's friendly and free :)
Legend has it that reading the manual never killed anyone.
My site

#7 Mongrel

Mongrel
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 14 September 2006 - 03:49 PM

You might want to check out my comments script ... http://www.digitalmi...oob/comment.php

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


Thanks Andy B




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users