Jump to content

Recommended Posts

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
?>

Link to comment
https://forums.phpfreaks.com/topic/188074-cant-cache-request/
Share on other sites

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>

Link to comment
https://forums.phpfreaks.com/topic/188074-cant-cache-request/#findComment-992894
Share on other sites

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>

 

Link to comment
https://forums.phpfreaks.com/topic/188074-cant-cache-request/#findComment-992902
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/188074-cant-cache-request/#findComment-992919
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.