how to insert radio button values and dropdown values to database postgresql using php -
I want to include the data in the PostChrase database which includes the radio button and the dropdown box. I try 3 different incomplete questions. Is of
1) 2) 3) My problem is entered alone in 1 query Oli name and no record is entered on 2nd, 3rd. Do not drop the Y dropdown nd radio button into the database? Tanx can be in advance .. May be because none of those 3 is the appropriate PHP code. Question 1: Do not use $ _REQUEST. Use $ _POST. Q2: As long as you do not have register_globals running, I'm seriously hoping that you do not, your wars ($ tile , $ Name, etc.) will not include the information submitted by the form. Again, you want to use $ _POST. Query 3: Your variables have not escaped properly. Generally, I recommend not embedding the variable in double-quoted strings. If you do not have enough understanding on string containment in PHP, use single-quoted string and by breaking the string and compiling it with Now, I think your second query is closest to what you want, so try it (title, name, district, rurban, taluk, village, wardano) values ("'. $ '_ POST [' tile]]. ", ''. $ _ POST ['name'].", ''. $ _ POST ['district']. ", ''. $ _ POST ['raban' ]. ',' '. $ _ POST [' taluk ']. ",' '. $ _ POST [' village '].",' '. $ _ POST [' wardano ']. ""); ';
$ query = sprintf ("inf value ('% s','% s', '% s ','% S ','% s', '% s','% d ') ", $ _ request [' title '], $ _ request [' name '], $ _ Request ['district'], $ _ request ['rurban'], $ _ request ['taluk'], $ _ request ['village'], $ _ request ['wardno']);
$ qry = "onf (title, name, district, rabon, taluk, village, wardano) Value ('$ tile', '$ name', '$ district', '$ rurban', '$ taluk', '$ village', '$ wardano') ";
$ qy = "enf (title, name, district, rabon, taluk, village, wardano) Value ('$ _POST [title]', 'General', '$ _ post [normal])', '$ _ POST [name]', '$ _ POST [district]', '$ _ POST [raban]' , '$ _POST [taluk]', '$ _ post [village]', '$ _ post [wardno]') "; $ Res = pg_query ($ db, $ qy);
Build them. .
Comments
Post a Comment