What it want from me?

<?php
if (isset($_POST['submit']) &&
    $_POST['submit'] == "Update") {
    $query_update = "UPDATE preturi SET
        preturi  = '" . $_POST['preturi'] . "'
        WHERE username = '" . $_SESSION['user_logged'] . "'
        AND password = '" . $_SESSION['user_password'] ."'";

        $result_update = mysql_query($query_update)
        or die(mysql_error());
        $query = "SELECT * FROM user_info,preturi 
        WHERE user_info.user_id=preturi.id_ofertant
        AND username = '" . $_SESSION['user_logged'] . "'
        AND password = '" . $_SESSION['user_password'] . "'";
           
            $result = mysql_query($query)
            or die(mysql_error());
             $row = mysql_fetch_array($result);
          
?>
    <b>Your account information has been updated.</b><br>
<a href="user_personal.php">Click here</a> to return to your account.

</p>
<?php
} else {
$query = "SELECT * FROM user_info,preturi
            WHERE user_info.user_id=preturi.id_ofertant
            AND username = '" . $_SESSION['user_logged'] . "'
            AND password = '" . $_SESSION['user_password'] ."'";
           
             
            if (isset( $query) && !empty( $query)) {  
           "<!--" .  $query . "-->";
          $result = mysql_query( $query)
       or die ("invalid query 4: " . mysql_error ());}
       while ($row = mysql_fetch_array($result)){
           
          
    ?>
"<p><form action="updatepreturi.php" method="post"></p>

<?php echo$row['id_manopera'];?>:
<input type="text" size='2' name="preturi"value="<?php echo $row['Pret_manopera'];}}?>"><br>




<input type="submit" name="submit" value="Update"> &nbsp;
<input type="button" value="Cancel" onclick="history.go(-1);">
</form>

What it want from me?

<?php
if (isset($_POST['submit']) &&
    $_POST['submit'] == "Update") {
    $query_update = "UPDATE preturi SET
        preturi  = '" . $_POST['preturi'] . "'
        WHERE username = '" . $_SESSION['user_logged'] . "'
        AND password = '" . $_SESSION['user_password'] ."'";

        $result_update = mysql_query($query_update)
        or die(mysql_error());
        $query = "SELECT * FROM user_info,preturi 
        WHERE user_info.user_id=preturi.id_ofertant
        AND username = '" . $_SESSION['user_logged'] . "'
        AND password = '" . $_SESSION['user_password'] . "'";
           
            $result = mysql_query($query)
            or die(mysql_error());
             $row = mysql_fetch_array($result);
          
?>
    <b>Your account information has been updated.</b><br>
<a href="user_personal.php">Click here</a> to return to your account.

</p>
<?php
} else {
$query = "SELECT * FROM user_info,preturi
            WHERE user_info.user_id=preturi.id_ofertant
            AND username = '" . $_SESSION['user_logged'] . "'
            AND password = '" . $_SESSION['user_password'] ."'";
           
             
            if (isset( $query) && !empty( $query)) {  
           "<!--" .  $query . "-->";
          $result = mysql_query( $query)
       or die ("invalid query 4: " . mysql_error ());}
       while ($row = mysql_fetch_array($result)){
           
          
    ?>
"<p><form action="updatepreturi.php" method="post"></p>

<?php echo$row['id_manopera'];?>:
<input type="text" size='2' name="preturi"value="<?php echo $row['Pret_manopera'];}}?>"><br>




<input type="submit" name="submit" value="Update"> &nbsp;
<input type="button" value="Cancel" onclick="history.go(-1);">
</form>

try replacing '" to " only. Ϋ

What to replace?

What to replace?

<?php
if (isset($_POST['submit']) &&
    $_POST['submit'] == "Update") {
    $query_update = "UPDATE preturi SET
        preturi  = [COLOR="Red"]'"[/COLOR] . $_POST['preturi'] . "'
        WHERE username = '" . $_SESSION['user_logged'] . "'
        AND password = '" . $_SESSION['user_password'] ."'";

        $result_update = mysql_query($query_update)
        or die(mysql_error());
        $query = "SELECT * FROM user_info,preturi 
        WHERE user_info.user_id=preturi.id_ofertant
        AND username = '" . $_SESSION['user_logged'] . "'
        AND password = '" . $_SESSION['user_password'] . "'";

            $result = mysql_query($query)
            or die(mysql_error());
             $row = mysql_fetch_array($result);

?>
    <b>Your account information has been updated.</b><br>
<a href="user_personal.php">Click here</a> to return to your account.

</p>
<?php
} else {
$query = "SELECT * FROM user_info,preturi
            WHERE user_info.user_id=preturi.id_ofertant
            AND username = '" . $_SESSION['user_logged'] . "'
            AND password = '" . $_SESSION['user_password'] ."'";


            if (isset( $query) && !empty( $query)) {  
           "<!--" .  $query . "-->";
          $result = mysql_query( $query)
       or die ("invalid query 4: " . mysql_error ());}
       while ($row = mysql_fetch_array($result)){


    ?>
"<p><form action="updatepreturi.php" method="post"></p>

<?php echo$row['id_manopera'];?>:
<input type="text" size='2' name="preturi"value="<?php echo $row['Pret_manopera'];}}?>"><br>




<input type="submit" name="submit" value="Update"> &nbsp;
<input type="button" value="Cancel" onclick="history.go(-1);">
</form>

'" to " only .
single quote and double quote to double quote only. :)

not so sure. :'(

it not working the replace give me another error

thank you for reply

it not working the replace give me another error

what error does it says?

thank you for reply

no problem. :$

Now i change all and no error but it still not working

I am very upset cause last night workt but now it not working. All Ive done was to clear the temporary internet folder on maintanance...hm?>

Now i change all and no error but it still not working

try to echo the $query and check if the output is correct. Ϋ

I am very upset cause last night workt but now it not working. All Ive done was to clear the temporary internet folder on maintanance...hm?>

so there's no error with the query. :idea:

how did you exactly do that?
i mean clearing the temporary internet folder on maintenance?

can you copy and paste the error here?
thanks. Ϋ

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.