after converting from php 4.0 to php 5.3 my variables are not passing - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: after converting from php 4.0 to php 5.3 my variables are not passing (/showthread.php?tid=3451) |
after converting from php 4.0 to php 5.3 my variables are not passing - geeman - 2012-08-18 <?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? after converting from php 4.0 to php 5.3 my variables are not passing - shawn_a - 2012-08-18 how did you test this ? whats in traceprint ? try Code: print_r($_POST); after converting from php 4.0 to php 5.3 my variables are not passing - geeman - 2012-08-19 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 ... ..........?> after converting from php 4.0 to php 5.3 my variables are not passing - shawn_a - 2012-08-19 Magic globals doesn't work anymore You have to use post array like you do in the first code you posted. |