web_master Posted January 11, 2010 Share Posted January 11, 2010 Hi, I got a problem, and I can't find where is the problem Here is a 2 files, first is a list and there is a form: <div class="SubmitCont"> <form action="<?php echo 'UpdScroll.php';?>" method="post"> <div><input type="submit" name="UpdateSubmit" value="<?php echo 'CHANGE';?>" class="SubmitOn" /></div> <div><input type="hidden" name="scroll_id" value="<?php echo $REQUEST[ 'scroll_id' ];?>" /></div> </form> </div> the other file is a file for update, but I don't know where is a problem, because I can't "cache" the ID (scroll_id) <?php // Reload == 1 if ( $Reload == '1' ) { // Reload from dBase $QueryReturn = mysql_query( 'SELECT * FROM `scroll` WHERE `scroll_id` = "' . $_POST[ 'scroll_id ' ] . '" ' ); // Check query if ( !$QueryReturn ) { echo mysql_error(); exit; } // Request query $REQUEST = mysql_fetch_array ( $QueryReturn ); } // end of Reload == 1 ?> Quote Link to comment https://forums.phpfreaks.com/topic/188074-cant-cache-request/ Share on other sites More sharing options...
RaythMistwalker Posted January 11, 2010 Share Posted January 11, 2010 your missing a _ in your $_REQUEST: <div class="SubmitCont"> <form action="<?php echo 'UpdScroll.php';?>" method="post"> <div><input type="submit" name="UpdateSubmit" value="<?php echo 'CHANGE';?>" class="SubmitOn" /></div> <div><input type="hidden" name="scroll_id" value="<?php echo $_REQUEST[ 'scroll_id' ];?>" /></div> </form> </div> Quote Link to comment https://forums.phpfreaks.com/topic/188074-cant-cache-request/#findComment-992894 Share on other sites More sharing options...
JonnoTheDev Posted January 11, 2010 Share Posted January 11, 2010 Also why use php to echo static text? <form action="<?php echo 'UpdScroll.php';?>" method="post"> <form action="UpdScroll.php" method="post"> <div><input type="submit" name="UpdateSubmit" value="<?php echo 'CHANGE';?>" class="SubmitOn" /></div> <div><input type="submit" name="UpdateSubmit" value="CHANGE" class="SubmitOn" /></div> Quote Link to comment https://forums.phpfreaks.com/topic/188074-cant-cache-request/#findComment-992902 Share on other sites More sharing options...
web_master Posted January 11, 2010 Author Share Posted January 11, 2010 your missing a _ in your $_REQUEST: <div class="SubmitCont"> <form action="<?php echo 'UpdScroll.php';?>" method="post"> <div><input type="submit" name="UpdateSubmit" value="<?php echo 'CHANGE';?>" class="SubmitOn" /></div> <div><input type="hidden" name="scroll_id" value="<?php echo $_REQUEST[ 'scroll_id' ];?>" /></div> </form> </div> $REQUEST is OK, because: <?php // Reload from dBase $QueryReturn = mysql_query( 'SELECT * FROM `scroll` ORDER BY `scroll_id` DESC ' ); // Check query if ( !$QueryReturn ) { echo mysql_error(); exit; } // Request query while ( $REQUEST = mysql_fetch_array ( $QueryReturn ) ) { ?> <div class="SubmitCont"> <form action="<?php echo 'UpdScroll.php';?>" method="post"> <div><input type="submit" name="UpdateSubmit" value="<?php echo 'CHANGE';?>" class="SubmitOn" /></div> <div><input type="hidden" name="scroll_id" value="<?php echo $REQUEST[ 'scroll_id' ];?>" /></div> </form> </div> <?php }?> as You see after while, when Im reloading list Quote Link to comment https://forums.phpfreaks.com/topic/188074-cant-cache-request/#findComment-992919 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.