Hello,

I am sorry to bother you all again. I am creating a script, which is used for storing the parcels sent. Now, I have done everything. Just need to add one feature.

I have a MYSQL field named TRACKING which will hold tracking information or reciept numbers of the items sent. Since, these numbers will be provided after I will actually ship the items, I will have to update these fields at a later stage, after adding the
parcel information.

What I store at the moment in MYSQL:

Name:
Address:
Weight:
Price:
Items:
Date:
ID: Auto created using AUTO_INCREMENT
TRACKING: This remains empty

Once I add the above information, it generates a shipping label after adding above data into MYSQL, which I paste on parcel and send it.

Now, I have a tracking Code after sending the parcel. Which I want to add along with the above information.

So what I need is, that a page, where it displays

| ID | NAME | ITEMS | TRACKING |
| XX | xxXX | XXXXX | E M P T Y|


Here I can enter the Tracking information and upate.

I know its a lot of work, but can someone just give me a syntax to do that? I know no PHP so I cant do it on my own.

Any help would be appreaciated.

To add, it will be run locally and not on web so there are no security issues involved.

Hi
Have a look at www.w3schools.com/php/default.asp gives a very good run through of how to use php and mysql

Basically your wanting coding for free which in this day and age don't happen but to put you in the right direction you want to running an update sql query to your data base.
eg

$sql = "UPDATE tableName SET tracking = '$whatever' WHERE id = '$id'";

// now run the code using 
$result=mysql_query($sql,$db);

// and then check if the query ran
if($result){

As I said there are some really good tutorials on the web that can have you up and running in no time.

N

Yes, you can google about that, that is a simple mysql query syntax.

Hans

Ok, I am using this tutorial but I think in the last PHP where it actually update the date has some problems. It does not get information of variables. Can you please redirect me the correct code?

http://www.phpeasystep.com/mysql/9.html

Ok, I am using this tutorial but I think in the last PHP where it actually update the date has some problems. It does not get information of variables. Can you please redirect me the correct code?

http://www.phpeasystep.com/mysql/9.html

for updating the date you just simply add to your sql syntax : now(), it will return today's date and time. but in your database, change field date type to DATE TIME.

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.