Jump to content

Togfather

New Members
  • Posts

    2
  • Joined

  • Last visited

Togfather's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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
  2. 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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.