Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7177011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:37:26+00:00 2026-05-28T16:37:26+00:00

i am trying to edit a mysql database record , there is seem to

  • 0

i am trying to edit a mysql database record , there is seem to be an issue with my code

here is the code from page editVisitor.php

    <?
    while($row=mysql_fetch_array($result)) 
    { 
    ?>
    <?
    $message=stripslashes($row["userUserName"]);
    $msg_id=$row["useId"];  
    ?>

      <li><a href="editUserDetails.php?edit=<?php echo $msg_id; ?>" >
<?php echo $message; ?></a>   <a href="#" id="<?php echo $msg_id; ?>" class="delete_button">X</a></li>


    <?php
    }
    ?>

this is my code in editUserDetails.php that open new page with all fields to update the record :

<?php

$connection= mysql_pconnect("localhost","root","123") or die (mysql_error());
            $db= mysql_select_db("reservebox",$connection) or die (mysql_error());


$selectdata="SELECT * FROM user WHERE useId =" . $edit . "";
mysql_query($selectdata);

$row = mysql_fetch_array($selectdata);


?>

//html form and table code



<input type="text" name="FirstName" id="FirstName" value="<? echo $row['userUserName']; ?>"/>

the editVisitorDetails.php doesn’t show any data and i continue get this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:37:27+00:00Added an answer on May 28, 2026 at 4:37 pm
    $selectdata="SELECT * FROM user WHERE useId =" . $edit . "";
    $query=mysql_query($selectdata);
    
    $row = mysql_fetch_array($query);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to hammer togehter a WYSIWYG-edit in c# following some examples from here
I am trying to write a PHP-MySQL database processor that is somewhat intelligent. When
I'm trying to edit my MySQL database after a long time of taking a
I am trying to edit a field in MySQL via PHP to NOT NULL
I am trying to extract substring from string gettting from mysql database using substr
I am trying to query a MySQL database using webpy. From the SQL query,
I am trying to populate a text field with data from a MySQL database,
I am trying to make a PHP script that fetches records from the database,
Here is the test page: http://grozav.com/test.php I'm trying to add a jquery function to
I am trying to edit a record. I have the default route. When I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.