php - Error in mySQL form submission -


I am working on a student registration system, where user login is used by username and amp; After entering the landing page display student name, user_id, and department (using the echo function from muxel), the password assigned to them (the login system works fine) is asked to choose courses to register them, After submission, I need to update the syllabus against ISSL User_id (which was shown on the previous page) Update on selected course mysql. Received do but only if i user_id would define for example:

  mysql_select_db ( 'school', $ con); $ Fresh = $ _REQUEST ["Fresh"]; $ User_id = $ _REQUEST ["user_id"]; $ Sql ​​= "UPDATE` rasmp_accounts` SET` fresh` = '$ refresh' Where 'user_id` =' 001 '";   

But when I define the situation where it does not work:

  mysql_select_db ('school', $ shan); $ Fresh = $ _REQUEST ["Fresh"]; $ User_id = $ _REQUEST ["user_id"]; $ Sql ​​= "UPDATE` rasmp_accounts` SET` fresh` = '$ refresh' WHERE 'user_id` =' $ user_id '";   

This may be the reason that user_id (which was displayed on the previous page) was not the form field, but the echo function was there, so $ user_id = $ _REQUEST ["user_id "]; Can not bring user_id from the previous page Is there any way by which I can get user_id from the previous page and link it to the submit page so that it is only user_id Could you update courses that matched?

Any help will be highly grateful: (

This is a bit difficult to see That's what you mean without looking at all your code (previous page), but if you want to draw something from the request ['user_id'], then you should put something in it either in the hidden input

  & lt; input type = "hidden" name = "user_id" value = "">   

or By doing this with $ _GET ['user_id']

  form method = "post" action = "myProcess.php? User_id =    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -