Togfather Posted March 6, 2013 Share Posted March 6, 2013 Hello, I hope this is the right place for my question. I am new to php, having spent more than a decade writing in vbscript for asp pages, and I am stumped by this problem. I have searched both of my PHP manuals, the net and forums galore but cannot find the answer. I am trying to display records from mysql with a button to delete each record in the display. However, when I press the button, the information does not get through to the manipulation page. In the first page my relevant code is: <form action="<?=$_SERVER[ 'PHP_SELF' ] ?>" method="post"> <input type="hidden" name="ident" value="<? echo $row[0];?>"> <input type="submit" value="Delete"></form> $row [0] is the auto incrementing ID field and in this instance I have checked that it contains a value, which is the integer 3. Now when I get to the next page, which is supposed to delete the record, I do not get any errors, but nothing happens, so I wrote the following code to check that the information had been passed through. <?php $id = (INT)$_post['ident']; echo 'Form input= ', $_post['ident'], '<br>'; echo '$id= ', $id, '<br>'; This produces input= $id= 0 when it should produce input = 3 $id= 3 Once I can get the production of an integer in the $id variable I will be able to delete the record from the database. Can anyone tell me what I have done wrong please? Many thanks in advance. Link to comment https://forums.phpfreaks.com/topic/275316-form-input-is-not-getting-through/ Share on other sites More sharing options...
Togfather Posted March 6, 2013 Author Share Posted March 6, 2013 OK I have fixed it now. I was forgetting that the $_POST function is case sensitive and used lower case. Upper casing it has fixed the problem. I spent days pondering this too - just shows that I am getting old :-) Regards Tog Link to comment https://forums.phpfreaks.com/topic/275316-form-input-is-not-getting-through/#findComment-1416937 Share on other sites More sharing options...
Guest lenix Posted March 7, 2013 Share Posted March 7, 2013 Kindly mark it as SOLVED sir. Link to comment https://forums.phpfreaks.com/topic/275316-form-input-is-not-getting-through/#findComment-1417147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.