Jump to content

Suddenly: Value not getting passed from a hidden field


swatisonee

Recommended Posts

I feel silly even putting this post up but am at my wits end. Have done loads of this kind of scripting but all of a sudden, a hidden field value is not getting passed into the next script.

Php 1 snippet

[code]$sql1="select max(CID) from `Customers`";

$result1 = mysql_query($sql1)
or die (mysql_error());

$myrow = mysql_fetch_row($result1);
$cid = $myrow[0];


echo "<b>Information entered</b>";

?> // needed as its part of a code.

<input type="hidden" name="cid" value="<? echo $cid ?>"> // WORKS CORRECTLY

Click to enter the
<?php
echo "<a href=\"add_custadd1.php?cid=$cid&userid=$userid\">";
?>

address </a>[/code]

Php 2 snippet
[code]
<? include("protect.php"); ?> // db info

<?
$cid = $_POST["cid"]; // NOT REFLECTING although the value of $cid shows up in the address bar

echo $cid;
?>[/code]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.