I need Help with the below update Code

Please help me.

am getting update message but nothing was changed in my DB

Below is the code

[php]<?php
$host=“localhost”; // Host name
$username=“"; // Mysql username
$password="
”; // Mysql password
$db_name="****"; // Database name
$tbl_name=“track_data”; // Table name

// Connect to server and select database.
mysql_connect("$host", “$username”, “$password”)or die(“cannot connect”);
mysql_select_db("$db_name")or die(“cannot select DB”);

// update data in mysql database

$sql=“UPDATE $tbl_name SET booking_no=’$booking_no’, sender_name=’$sender_name’, sender_addr=’$sender_addr’ WHERE track_no=’$track_no’”;

$result=mysql_query($sql);

// if successfully updated.
if($result){
echo “Successful”;
echo “
”;
echo “View result”;
}

else {
echo “ERROR”;
}

?>[/php]

Update queries MUST end in a semi colon:
[php]
$sql=“UPDATE $tbl_name SET booking_no=’$booking_no’, sender_name=’$sender_name’, sender_addr=’$sender_addr’ WHERE track_no=’$track_no’;”;[/php]

Thanks for your help mate, i did as you have instructed, yet the update are not changing and once i click update i get the successful status and yet nothing changes

Here is the update code, please help me out

[php]<?php
$host=“localhost”; // Host name
$username=“affbonli_user”; // Mysql username
$password=“ade500”; // Mysql password
$db_name=“affbonli_track”; // Database name
$tbl_name=“track_data”; // Table name

// Connect to server and select database.
mysql_connect("$host", “$username”, “$password”)or die(“cannot connect”);
mysql_select_db("$db_name")or die(“cannot select DB”);

// update data in mysql database

$sql=“UPDATE $tbl_name SET booking_no=’$booking_no’, sender_name=’$sender_name’, sender_addr=’$sender_addr’ WHERE track_no=’$track_no’;”;

$result=mysql_query($sql);

// if successfully updated.
if($result){
echo “Successful”;
echo “
”;
echo “View result”;
}

else {
echo “ERROR”;
}

?>[/php]

You have integers in quotes. Things like booking_no and track_no i’m guessing are integers in your table, so your query should be:
[php]
$sql=“UPDATE $tbl_name SET booking_no=$booking_no, sender_name=’$sender_name’, sender_addr=’$sender_addr’ WHERE track_no=$track_no;”;[/php]

When i got the New code you sent me

This was the result i Got

ERROR

I guess there mush be something wrong somewhere please check for me

Thanks

replace the $result = mysql_query($sql) line to this:

[php]
$result=mysql_query($sql) or die("MySQL Error: ".mysql_error().“
Table:{$tbl_name}
Booking No:{$bookin_no}
Sender Name:{$sender_name}
Address:{$sender_addr}
Track:{$track_no}”);
[/php]

This should help pinpoint if the error is in that query. It will also echo out all the variables so you can see if they show what they should.

Another note: where are you actually defining the variables used in the query?

Thanks mate, after doing your last instruction this was the result i got.

MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’ sender_name=’’, sender_addr=’’ WHERE track_no=’ at line 1
Table:track_data
Booking No:
Sender Name:
Address:
Track:

For a clearer picture let me explain what my main objective was.

I have 3 files,

list_records.php
update.php
update_ac.php

all i am trying to get was a list of of some of the field in the table and update them, if you want me to past all the 3 files i can do that, but i guess the first 2 files are working perfect just that, each time i click update, it tells me successful but nothing changes in my database.

I really appreciate your efforts.

hmm… Post all 3 files. I know what the error is but if I can see all the files it will be easier to fix.

Thanks Man, here are the 3 files

and if i may ask is it possible to re-write all the files to be a single file ??

Check the codes below


list_records.php

[php]<?php
$host=“localhost”; // Host name
$username=“affbonli_user”; // Mysql username
$password=“ade500”; // Mysql password
$db_name=“affbonli_track”; // Database name
$tbl_name=“track_data”; // Table name

// Connect to server and select database.
mysql_connect("$host", “$username”, “$password”)or die(“cannot connect”);
mysql_select_db("$db_name")or die(“cannot select DB”);

$sql=“SELECT * FROM $tbl_name”;
$result=mysql_query($sql);
?>

 

 

  <?php while($rows=mysql_fetch_array($result)){ ?> <?php } ?>

LIST OF ACTIVE TRACKING NUMBERS

Booking # Sender Name Sender Address UPDATE
<? echo $rows['booking_no']; ?> <? echo $rows['sender_name']; ?> <? echo $rows['sender_addr']; ?> UPDATE
<?php mysql_close(); ?>[/php]

update.php

[php]<?php
$host=“localhost”; // Host name
$username=“affbonli_user”; // Mysql username
$password=“ade500”; // Mysql password
$db_name=“affbonli_track”; // Database name
$tbl_name=“track_data”; // Table name

// Connect to server and select database.
mysql_connect("$host", “$username”, “$password”)or die(“cannot connect”);
mysql_select_db("$db_name")or die(“cannot select DB”);

// get value of id that sent from address bar
$track_no=$_GET[‘track_no’];

// Retrieve data from database
$sql=“SELECT * FROM $tbl_name WHERE track_no=’$track_no’”;
$result=mysql_query($sql);
$rows=mysql_fetch_array($result);
?>

 

 

UPDATE  TRACKING NO:

       
  Booking # Sendername Sender Address
 

 

 
<?php // close connection mysql_close(); ?>[/php]

================
update_ac.php

[php]<?php
$host=“localhost”; // Host name
$username=“affbonli_user”; // Mysql username
$password=“ade500”; // Mysql password
$db_name=“affbonli_track”; // Database name
$tbl_name=“track_data”; // Table name

// Connect to server and select database.
mysql_connect("$host", “$username”, “$password”)or die(“cannot connect”);
mysql_select_db("$db_name")or die(“cannot select DB”);

// update data in mysql database

$sql=“UPDATE $tbl_name SET booking_no=$booking_no, sender_name=’$sender_name’, sender_addr=’$sender_addr’ WHERE track_no=$track_no;”;

$result=mysql_query($sql) or die("MySQL Error: ".mysql_error().“
Table:{$tbl_name}
Booking No:{$bookin_no}
Sender Name:{$sender_name}
Address:{$sender_addr}
Track:{$track_no}”);

// if successfully updated.
if($result){
echo “Successful”;
echo “
”;
echo “View result”;
}

else {
echo “ERROR”;
}

?>[/php]

waiting to read from you

Ok, in the last file, under $tbl_name=“track_data”; put the following:

[php]
$booking_no=mysql_real_escape_string($_POST[‘name’]);
$sender_name=mysql_real_escape_string($_POST[‘lastname’]);
$sender_addr=mysql_real_escape_string($_POST[‘email’]);
$track_no=mysql_real_escape_string($_POST[‘id’]);
[/php]

You were using variables that hadn’t been defined.

Friend i am still getting an error, i guess i have to give up at this point and look for alternatives.

=========================
Below was the new error

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ‘affbonli’@‘localhost’ (using password: NO) in /home/affbonli/public_html/Quick/update_ac.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/affbonli/public_html/Quick/update_ac.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ‘affbonli’@‘localhost’ (using password: NO) in /home/affbonli/public_html/Quick/update_ac.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/affbonli/public_html/Quick/update_ac.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ‘affbonli’@‘localhost’ (using password: NO) in /home/affbonli/public_html/Quick/update_ac.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/affbonli/public_html/Quick/update_ac.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ‘affbonli’@‘localhost’ (using password: NO) in /home/affbonli/public_html/Quick/update_ac.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/affbonli/public_html/Quick/update_ac.php on line 6
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’ sender_name=’’, sender_addr=’’ WHERE track_no=’ at line 1
Table:track_data
Booking No:
Sender Name:
Address:
Track:

Ok Please read here i guess you can gelp me out on ths without much stress.

I have a File to create new user, can you help me re-rite the file to be able to add user ???

Check the below file.

===========
adduser.php

[php]<?
session_start();

if( !isset($_SESSION[‘admin_logged’]) )
{ header(‘Location: ./adminlogin.php’);
exit;}

$message = "You can ADD USERS from this CONTROL PANEL ";
$track_no=$_POST[‘track_no’];
$booking_no=$_POST[‘booking_no’];
$sender_name=$_POST[‘sender_name’];
$sender_addr=$_POST[‘sender_addr’];
$sender_city=$_POST[‘sender_city’];
$sender_state=$_POST[‘sender_state’];
$sender_zipcode=$_POST[‘sender_zipcode’];
$sender_country=$_POST[‘sender_country’];
$sender_phone=$_POST[‘sender_phone’];
$receiver_name=$_POST[‘receiver_name’];
$receiver_addr=$_POST[‘receiver_addr’];
$receiver_city=$_POST[‘receiver_city’];
$receiver_state=$_POST[‘receiver_state’];
$receiver_zipcode=$_POST[‘receiver_zipcode’];
$receiver_country=$_POST[‘receiver_country’];
$receiver_phone=$_POST[‘receiver_phone’];
$package_description=$_POST[‘package_description’];
$package_weight=$_POST[‘package_weight’];
$percel_shipdate=$_POST[‘percel_shipdate’];
$percel_deliverydate=$_POST[‘percel_deliverydate’];
$percel_shipfrom=$_POST[‘percel_shipfrom’];
$percel_shipto=$_POST[‘percel_shipto’];
$last_packagestatus=$_POST[‘last_packagestatus’];
$present_packagestatus=$_POST[‘present_packagestatus’];

if( ($track_no!="")&&($booking_no!="")&&isset($_POST[‘add_user’]) )
{
include ‘./config.php’;

$link=mysql_connect(“localhost”,$user_db,$pass_db);
if(!link)
die(“Could not connect to MySql Server”.mysql_error() ); //check for database connection

mysql_select_db($db) or die(“could not select Database :$db”.mysql_error() );

$query =‘INSERT INTO '.$db.'.track_data (track_no, booking_no, sender_name, sender_addr, sender_city, sender_state, sender_zipcode, sender_country, sender_phone, receiver_name, receiver_addr, receiver_city, receiver_state, receiver_zipcode, receiver_country, receiver_phone, package_description, package_weight, service_type, percel_shipdate, percel_deliverydate, percel_shipfrom, percel_shipto, last_packagestatus, present_packagestatus) VALUES ("’.$track_no.’", “’.$booking_no.’”, “’.$sender_name.’”, “’.$sender_addr.’”, “’.$sender_city.’”, “’.$sender_state.’”, “’.$sender_zipcode.’”, “’.$sender_country.’”, “’.$sender_phone.’”, “’.$receiver_name.’”, “’.$receiver_addr.’”, “’.$receiver_city.’”, “’.$receiver_state.’”, “’.$receiver_zipcode.’”, “’.$receiver_country.’”, “’.$receiver_phone.’”, “’.$package_description.’”, “’.$package_weight.’”, “’.$service_type.’”, “’.$percel_shipdate.’”, “’.$percel_deliverydate.’”, “’.$percel_shipfrom.’”, “’.$percel_shipto.’”, “’.$last_packagestatus.’”, “’.$present_packagestatus.’”)’;

mysql_query($query) or die (“Invalid query [you are pobably trying to add a user with same account no.]
:”.mysql_error() ); //check the query

$message = "TRACKING # has been SUCCESSFULLY added !! ";
mysql_close( $link );
}
else if( isset($_POST[‘add_user’]) )
$message = “Please Fill the Required Fields .[ Required Filed can not be empty !! ]”;
?>

AccountHome

 

Admin Control Panel
 
Account Home
            <p><b><a href="adduser.php">
			<font color="#0000ff" size="2" face="Verdana">Add User </font> </a>
			</b></p>

            <p><b><a href="deleteuser.php">
			<font color="#0000ff" size="2" face="Verdana">Delete User </font></a>
			</b></p>

            <p><b><a href="list_records.php">
			<font color="#0000ff" size="2" face="Verdana">View Tracking # </font>
			</a>
			</b></p>

            <p><b><a href="viewusers.php">
			<font color="#0000ff" size="2" face="Verdana">View Users info </font></a>
			</b></p>

            <p><b><a href="adminlogout.php">
			<font color="#0000ff" size="2" face="Verdana">Logout</font></a></b></p>  </td> 
<td width="4" valign="top" class="style2" height="311">
    &nbsp;</td> 
<tbody><tr>
  <td class="style3">
	<p align="center">Welcome</td> 
  <td class="style4">
	<p align="center"><B>ADMINISTRATOR&nbsp;</B></td> 
</tr>

 

<? echo $message; ?>

 

                TRACKING DETAILS

                    *Tracking No.      

                    *Booking No

 

                         SENDERS DETAILS

                                             Sender Name.     Sender Address.      

                                             Sender City. Sender State. 

                                             Sender Zip code.   Senders Country. 

                                             Sender's Phone.   

 

                                                            RECEIVER DETAILS

                                         Receiver's Name           Receiver's Address.    

                                           Receivers City.      Receivers State.          

                                                   Receivers Zip code.     Receiver Country.       

Receiver's Phone.      

   

PACKAGE DETAILS

                                                            Package-Description.     Package-weight. 

                                                            Service-Type.    Parcel-Ship-Date. 

                                                  Parcel-Delivery-Date    Parcel-Ship-From 

                                                  Parcel-Ship-To       Last-Package-Status          

      Present-Package-Status

 

[/php]

i need to make another file like the above fine updateuser.php

I will appreciate that if you can help me so i can just delete those 3 files previous given me problem and use the new editeuser.php

Thanks

Fix for your first one. Replace:
[php]
mysql_connect("$host", “$username”, “$password”)or die(“cannot connect”);
mysql_select_db("$db_name")or die(“cannot select DB”);
[/php]
in all your files with:
[php]
mysql_connect($host, $username, $password)or die(“cannot connect”);
mysql_select_db($db_name)or die(“cannot select DB”);
[/php]

As for the second one, what errors are you getting?

i am still getting the same error

can you please check if the last file is correct

==============
update_ac.php

[php]<?php
$host=“localhost”; // Host name
$username=“affbonli_user”; // Mysql username
$password=“ade500”; // Mysql password
$db_name=“affbonli_track”; // Database name
$tbl_name=“track_data”; // Table name
$booking_no=mysql_real_escape_string($_POST[‘name’]);
$sender_name=mysql_real_escape_string($_POST[‘lastname’]);
$sender_addr=mysql_real_escape_string($_POST[‘email’]);
$track_no=mysql_real_escape_string($_POST[‘id’]);

// Connect to server and select database.

mysql_connect($host, $username, $password)or die(“cannot connect”);
mysql_select_db($db_name)or die(“cannot select DB”);

// update data in mysql database

$sql=“UPDATE $tbl_name SET booking_no=$booking_no, sender_name=’$sender_name’, sender_addr=’$sender_addr’ WHERE track_no=$track_no;”;

$result=mysql_query($sql) or die("MySQL Error: ".mysql_error().“
Table:{$tbl_name}
Booking No:{$bookin_no}
Sender Name:{$sender_name}
Address:{$sender_addr}
Track:{$track_no}”);

// if successfully updated.
if($result){
echo “Successful”;
echo “
”;
echo “View result”;
}

else {
echo “ERROR”;
}

?>[/php]

Thanks

I can’t see any immediate errors. I’ll throw it into my IDE just now and see what it says. if I still see no errors, i’ll re-write it for you see if it helps

From php.net:

A MySQL connection is required before using mysql_real_escape_string() otherwise an error of level E_WARNING is generated, and FALSE is returned. If link_identifier isn't defined, the last MySQL connection is used.

Mode
[php]
$booking_no=mysql_real_escape_string($_POST[‘name’]);
$sender_name=mysql_real_escape_string($_POST[‘lastname’]);
$sender_addr=mysql_real_escape_string($_POST[‘email’]);
$track_no=mysql_real_escape_string($_POST[‘id’]);
[/php]
to AFTER

[php]
mysql_connect($host, $username, $password)or die(“cannot connect”);
mysql_select_db($db_name)or die(“cannot select DB”);[/php]

I am not a php expect just a newbie i guess it now getting complicated for me because of lots of errors.

i have deleted the 3 files and now i need to create a new file, please can you write the for me.

all i want is an update file to update all fields in a table, you can help me write a new file or you can just tell me all to do.

here is my adduser.php i need to create a new file caled updateuser.php

check this file to help me create a new file

=============
adduser.php

[php]<?
session_start();

if( !isset($_SESSION[‘admin_logged’]) )
{ header(‘Location: ./adminlogin.php’);
exit;}

$message = "You can ADD USERS from this CONTROL PANEL ";
$track_no=$_POST[‘track_no’];
$booking_no=$_POST[‘booking_no’];
$sender_name=$_POST[‘sender_name’];
$sender_addr=$_POST[‘sender_addr’];
$sender_city=$_POST[‘sender_city’];
$sender_state=$_POST[‘sender_state’];
$sender_zipcode=$_POST[‘sender_zipcode’];
$sender_country=$_POST[‘sender_country’];
$sender_phone=$_POST[‘sender_phone’];
$receiver_name=$_POST[‘receiver_name’];
$receiver_addr=$_POST[‘receiver_addr’];
$receiver_city=$_POST[‘receiver_city’];
$receiver_state=$_POST[‘receiver_state’];
$receiver_zipcode=$_POST[‘receiver_zipcode’];
$receiver_country=$_POST[‘receiver_country’];
$receiver_phone=$_POST[‘receiver_phone’];
$package_description=$_POST[‘package_description’];
$package_weight=$_POST[‘package_weight’];
$percel_shipdate=$_POST[‘percel_shipdate’];
$percel_deliverydate=$_POST[‘percel_deliverydate’];
$percel_shipfrom=$_POST[‘percel_shipfrom’];
$percel_shipto=$_POST[‘percel_shipto’];
$last_packagestatus=$_POST[‘last_packagestatus’];
$present_packagestatus=$_POST[‘present_packagestatus’];

if( ($track_no!="")&&($booking_no!="")&&isset($_POST[‘add_user’]) )
{
include ‘./config.php’;

$link=mysql_connect(“localhost”,$user_db,$pass_db);
if(!link)
die(“Could not connect to MySql Server”.mysql_error() ); //check for database connection

mysql_select_db($db) or die(“could not select Database :$db”.mysql_error() );

$query =‘INSERT INTO '.$db.'.track_data (track_no, booking_no, sender_name, sender_addr, sender_city, sender_state, sender_zipcode, sender_country, sender_phone, receiver_name, receiver_addr, receiver_city, receiver_state, receiver_zipcode, receiver_country, receiver_phone, package_description, package_weight, service_type, percel_shipdate, percel_deliverydate, percel_shipfrom, percel_shipto, last_packagestatus, present_packagestatus) VALUES ("’.$track_no.’", “’.$booking_no.’”, “’.$sender_name.’”, “’.$sender_addr.’”, “’.$sender_city.’”, “’.$sender_state.’”, “’.$sender_zipcode.’”, “’.$sender_country.’”, “’.$sender_phone.’”, “’.$receiver_name.’”, “’.$receiver_addr.’”, “’.$receiver_city.’”, “’.$receiver_state.’”, “’.$receiver_zipcode.’”, “’.$receiver_country.’”, “’.$receiver_phone.’”, “’.$package_description.’”, “’.$package_weight.’”, “’.$service_type.’”, “’.$percel_shipdate.’”, “’.$percel_deliverydate.’”, “’.$percel_shipfrom.’”, “’.$percel_shipto.’”, “’.$last_packagestatus.’”, “’.$present_packagestatus.’”)’;

mysql_query($query) or die (“Invalid query [you are pobably trying to add a user with same account no.]
:”.mysql_error() ); //check the query

$message = "TRACKING # has been SUCCESSFULLY added !! ";
mysql_close( $link );
}
else if( isset($_POST[‘add_user’]) )
$message = “Please Fill the Required Fields .[ Required Filed can not be empty !! ]”;
?>

AccountHome

 

Admin Control Panel
 
Account Home
            <p><b><a href="adduser.php">
			<font color="#0000ff" size="2" face="Verdana">Add User </font> </a>
			</b></p>

            <p><b><a href="deleteuser.php">
			<font color="#0000ff" size="2" face="Verdana">Delete User </font></a>
			</b></p>

            <p><b><a href="list_records.php">
			<font color="#0000ff" size="2" face="Verdana">View Tracking # </font>
			</a>
			</b></p>

            <p><b><a href="viewusers.php">
			<font color="#0000ff" size="2" face="Verdana">View Users info </font></a>
			</b></p>

            <p><b><a href="adminlogout.php">
			<font color="#0000ff" size="2" face="Verdana">Logout</font></a></b></p>  </td> 
<td width="4" valign="top" class="style2" height="311">
    &nbsp;</td> 
<tbody><tr>
  <td class="style3">
	<p align="center">Welcome</td> 
  <td class="style4">
	<p align="center"><B>ADMINISTRATOR&nbsp;</B></td> 
</tr>

 

<? echo $message; ?>

 

                TRACKING DETAILS

                    *Tracking No.      

                    *Booking No

 

                         SENDERS DETAILS

                                             Sender Name.     Sender Address.      

                                             Sender City. Sender State. 

                                             Sender Zip code.   Senders Country. 

                                             Sender's Phone.   

 

                                                            RECEIVER DETAILS

                                         Receiver's Name           Receiver's Address.    

                                           Receivers City.      Receivers State.          

                                                   Receivers Zip code.     Receiver Country.       

Receiver's Phone.      

   

PACKAGE DETAILS

                                                            Package-Description.     Package-weight. 

                                                            Service-Type.    Parcel-Ship-Date. 

                                                  Parcel-Delivery-Date    Parcel-Ship-From 

                                                  Parcel-Ship-To       Last-Package-Status          

      Present-Package-Status

 

[/php]

waiting to read from you

thanks

Hello friend, am still waiting for your reply.

Here is my new update code, each time i click on update it takes me back to the same page, please check if there is any error in the code.

==============
update.php

[php]<?
session_start();

if( !isset($_SESSION[‘admin_logged’]) )
{ header(‘Location: ./adminlogin.php’);
exit;}

include ‘./config.php’;

$link=mysql_connect(“localhost”,$user_db,$pass_db);
if(!link)
die(“Could not connect to MySql Server”.mysql_error() ); //check for database connection

mysql_select_db($db) or die(“could not select Database :$db”.mysql_error() );

?>

:::ADMIN HOME:::

 

 

Admin Control Panel
 
  <table style="width: 168px; height: 216px;" align="left" bgcolor="#cee3fd" border="0" width="180">
        <tbody><tr>
          <td>
            <b><a href="admin.php">
			<font color="#0000ff" size="2" face="Verdana">Account Home </font> </a></b>

            <p><b><a href="adduser.php">
			<font color="#0000ff" size="2" face="Verdana">Add User </font> </a>
			</b></p>

            <p><b><a href="deleteuser.php">
			<font color="#0000ff" size="2" face="Verdana">Delete User </font></a>
			</b></p>

            <p><b><a href="list_records.php">
			<font color="#0000ff" size="2" face="Verdana">View Tracking # </font>
			</a>
			</b></p>

            <p><b><a href="viewusers.php">
			<font color="#0000ff" size="2" face="Verdana">View Users info </font></a>
			</b></p>

            <p><b><a href="adminlogout.php">
			<font color="#0000ff" size="2" face="Verdana">Logout</font></a></b></p>  </td> 
          <td>&nbsp;</td> 
        </tr>

        <tr>
          <td colspan="2" align="right">&nbsp;&nbsp;&nbsp; </td> 
        </tr>
      </tbody>
    </table>

   </td> 

You can Update all Tracking #.

<tbody><tr>
  <td class="style3">Welcome</td> 
  <td class="style4"><B>ADMINISTRATOR&nbsp;</B></td> 
</tr>

<? // get value of id that sent from address bar $track_no=$_GET['track_no'];

// Retrieve data from database
$sql=“SELECT * FROM track_data WHERE track_no=’$track_no’”;
$result=mysql_query($sql);
$rows=mysql_fetch_array($result);
?>

 

UPDATE  TRACKING NO:

       
  Tracking # Sender Name Recivers Name
 

 

 
<?php // close connection mysql_close(); ?>[/php]

Are you using an IDE? If not I recommend netbeans ide.

I found this:
[php][/php] which appears to be unused and has no closing tag.

Is the file above the update_ac.php file? If not, I can’t find anything wrong with this file. If it is, your not actually saving anything to the database or anything.

Sponsor our Newsletter | Privacy Policy | Terms of Service