0

I am using a php form which will get the cid from the URL. e.g records.php?cid=23

But I am getting the error Undefined index of cid in the following line.

if (is_numeric($_POST['cid']))

 if (isset($_GET['cid']))
    {
    // if the form's submit button is clicked, we need to process the form
    if (isset($_POST['submit']))
    {
    // make sure the 'cid' in the URL is valid
    if (is_numeric($_POST['cid']))
    {
    // get variables from the URL/form
    $cid = $_POST['cid'];
Michael
  • 251
  • 3
  • 11

1 Answers1

2

It is GET not POST. $_GET['cid']

Saumini Navaratnam
  • 8,439
  • 3
  • 42
  • 70