Jump to content

I can add to my database, but how can I update it?


aaricwon

Recommended Posts

I made this simple form: www.bjjnews.org/problems/form.html

 

I made this page that will display the data entered  by the form: www.bjjnews.org/problems/

 

Now I would like to update the database entries.

 

All I really want to do is update the last column that says Status.

 

Right now it says nothing BUT I would like to be able to put Complete or On Hold

 

I know how to make a form that add's to a database BUT I don't know how to make a form that updates a current database record.

 

Please help?

Link to comment
Share on other sites

I'm not using Oracle for this.

 

I really would like something as simple as this (because this is all I need). I would like to be able to type in the "Oracle Number" and then update the status on it. So basically

 

if oracle order = 70003232 update status to: whatever i type in.

 

I looked/went along with tutorials but for some reason can't seem to get it.

 

I just want to type in a number to specify which record (that # would be field_1) and then want to be able to type to update field_7.

 

Thank you guys. Everyone here is so good. I am sorry for annoying you with questions that I know are simple to you.

Link to comment
Share on other sites

I have no idea what my problem is (besides being clueless) but I still am not getting it...

 

--------------------------------------------

Here is my code for displaying the data:

 

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die                      ('Error connecting to mysql');

 

$dbname = 'bjjnews_problemorders';

mysql_select_db($dbname);

 

$query  = "SELECT * FROM problems1 ORDER BY id DESC";

$result = mysql_query($query);

 

echo "<table border='1'>

<tr>

<th>Oracle Order</th>

<th>Customer</th>

<th>Customer PO</th>

<th>Problem</th>

<th>Reported by</th>

<th>Date</th>

<th>Status</th>

</tr>";

 

while($row = mysql_fetch_array($result))

  {

  echo "<tr>";

  echo "<td>" . $row['field_1'] . "</td>";

  echo "<td>" . $row['field_2'] . "</td>";

    echo "<td>" . $row['field_3'] . "</td>";

  echo "<td>" . $row['field_4'] . "</td>";

    echo "<td>" . $row['field_5'] . "</td>";

  echo "<td>" . $row['field_6'] . "</td>";

    echo "<td>" . $row['field_7'] . "</td>";

  echo "</tr>";

  }

echo "</table>";

-----------------------------------------------------------------------

All I want to do is be able to specify a database entry and update field_7 for that particular entry. Sorry I am so bad at this. I'm learning though.

Link to comment
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.