php - GET and POST on the same page? -


EDIT: The answer was found! Thanks to a lot of people, a lot of answers worked, I chose the answer to the hidden area because it was the easiest: D

I am making a comment script and I have a problem. I have to use $ _POST and $ _GET on the same page, which I do not think is understandable.

I am very new in PHP and I am training myself.

I is a page with a view name verses.php - There is a list of verses when someone follows the answer link, then

  echo  

I am passing verseid (comment on Bible verses) in reply.php, so that a question with a verseid can be made. (This is because the user can still see the poem on which he is commenting).

Now to post an answer in answer.php there is the form in it. The form goes to postrely.php

This is in postReply.php

  $ title = $ _POST ['title']; $ Body = $ _POST ['body']; $ Verse = $ _GET [poetry];  

Can I get a word from the URL and get the value from the form on the same page?

If not, is this a better way? Remember, I'm new to php and probably will not apply the solution which is super hard. I have to put it on my site

I hope this is clear

post-text itemprop = "text">

I have a hidden input in the comment form I will add:

  & lt; Input type = "hidden" name = "verseid" value = "& lt ;? php echo $ _GET ['rhyme'] ;? & gt; / /  

In this way, in postReply.php, you can $ _ POST ['verseid'] .


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -