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
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">
</td>
|
<tbody><tr>
<td class="style3">
<p align="center">Welcome</td>
<td class="style4">
<p align="center"><B>ADMINISTRATOR </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