Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
after converting from php 4.0 to php 5.3 my variables are not passing
#1
<?php


$myphrase = $_POST ["myphrase"];
$ntrace = $_POST["ntrace"];
$nblank = $_POST["nblank"];


echo '<form method="post" action="traceprint.php">';

// enter # of trace and blanks

echo "Number of trace";
echo ' <select name="ntrace">';
echo '<option value="1"> 1 </option>';
echo '<option value="2"> 2 </option>';
echo '<option value="3"> 3 </option>';
echo '</select>';
echo " ";
echo "Number of blanks";
echo ' <select name="nblank">';
echo '<option value="1"> 1 </option>';
echo '<option value="2"> 2 </option>';
echo '<option value="3"> 3 </option>';
echo '<option value="4"> 4 </option>';
echo '<option value="5"> 5 </option>';
echo '</select>';
echo '<br>';

echo '<input name="myphrase" type="text" class="InputClass" value="" maxlength="28" />';

echo '<br>';

echo '<input type="submit" value="Make Worksheet" name="submit" >';

echo '<br>';

echo '</form>';
?>

K, my varibles are not being passed to traceprint.php why?
Reply
#2
how did you test this ?
whats in traceprint ?

try
Code:
print_r($_POST);
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
traceprint.php is where I print the varaibles, it use to work but after upgrade it wont. I will show part of the traceprint.php. I echo "$myphrase"; but nothing in it.

<?php

$scount = strlen($myphrase);


echo "Name___________________________________________________________________ Date________________________________";
echo '<br>';

echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">";
//echo "<tr>";
//echo "<tr><td>";
// echo "$scount";
for ( $row=1; $row <=$ntrace; $row +=1)
{
echo "<tr>";
for ( $counter = 0; $counter < $scount ; $counter += 1)
{
more stuff here ...
..........?>
Reply
#4
Magic globals doesn't work anymore
You have to use post array like you do in the first code you posted.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)