Please how can I use $_SERVER['PHP_SELF'] code to save record and print
simultaneouly using PHP. I need the data been submitted into the database to print on the POS printer. See form action used below. Please assist.
User 13659767
Posts
-
How can I save a record into MySQL database while the data also prints on my POS printer -
How to use $_SERVER['PHP_SELF'] to save record and print simultaneoulyHow to use a php $_SERVER['PHP_SELF'] to insert form data into Mysql database and print
same form data automatically// check which button was clicked
// perform calculation
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO reservation (`Class of Room`, `Room Number`, `Customer Name`, `Customer Address`, `Phone number`, Occupation, Amount, `Check in Time`, `Date`, Duration, `Name of Receptionist`) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['Class_of_Room'], "text"),
GetSQLValueString($_POST['Room_Number'], "text"),
GetSQLValueString($_POST['Customer_Name'], "text"),
GetSQLValueString($_POST['Customer_Address'], "text"),
GetSQLValueString($_POST['Phone_number'], "text"),
GetSQLValueString($_POST['Occupation'], "text"),
GetSQLValueString($_POST['Amount'], "text"),
GetSQLValueString($_POST['Check_in_Time'], "text"),
GetSQLValueString($_POST['Date'], "date"),
GetSQLValueString($_POST['Duration'], "text"),
GetSQLValueString($_POST['Name_of_Receptionist'], "text"));mysql_select_db($database_Morrendb, $Morrendb);
$Result1 = mysql_query($insertSQL, $Morrendb) or die(mysql_error());$insertGoTo = "reservation.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?> -
How to access text data from parent form to child form Using $_SERVER['PHP_SELF']With ?php echo $editFormAction/ $_SERVER['PHP_SELF'] as form action, how can I access the data entered in a form textbox but not submitted into db from another pop up window
-
How to reduce the size of a php webpage form into POS-printer-friendly pageI need to print a form data on another page. But the page been referenced opened a normal window. I want the window to appear in a smaller dimension to enable me print result to a POS printer. This is the code I used on the onCLick Button attributes. Please any idea will be appreciated. Thanks
-
How to make data entered on a form that has not been submitted into MySql database appear on another formI have a form that submits data into my MySql database using the
php $_SERVER['PHP_SELF']
But I want to be able to view the contents of the data entered prior to submission on another page. Using this code
It opens another page but does not show the data entered just the Caption for the textbox only. Please assist.
-
How to use 4 digit incremental serial number on mysql database using PHP on my formThanks Jochen.
-
How to use 4 digit incremental serial number on mysql database using PHP on my formPlease I need help on how to use 4 digit format as incremental value using PHP. the cod below I used displays incremetally but it only in 1,2,3 instead of 001,002,003. What is wrong with m code?
$query = "Select Max(Serial_Number) From captain_order";
$returnD = mysql_query($query);
$result = mysql_fetch_assoc($returnD);
Print mysql_error();
$maxRows = $result['Max(Serial_Number)'];
if(empty($maxRows)){
$lastRow = $maxRows = 1;
}else{
$lastRow = $maxRows + 0001 ;
} -
How to use PHP global processing script action to process sumbitted data and display form data entered on the text on another pageHow to use PHP global processing script action to process sumbitted data and display form data entered on the text on another page
. Please provide an easy way out of this. Thanks
-
How to use a php $_SERVER['PHP_SELF'] to insert form data into Mysql database and redisplay data entered on another formPlease I need a guide on how to use a php $_SERVER['PHP_SELF'] to insert form data into Mysql database and redisplay data entered on another form.
My form action is
Please assist
-
How to use multi user login with visual basic 6 and Microsoft access 2007Thanks for your response, I am on the verge of upgrading to VB.net. However I need to complete this project. If you still have an idea on how to generate this in VB 6. I will very much appreciate. Thanks
-
How to display on the form automatically the user that logins in a VB programSo how do i pass that to a method that sets the text (user name) of a label on a particular form. Kindly assist with the right code to use on the vb6 form
-
How to use multi user login with visual basic 6 and Microsoft access 2007Please I need to know the right code to use to access stored user logins in Microsoft access from visual basic 6 login form. Kindly assist as the code i used is not connecting.
Adodc1.RecordSource = "SELECT * FROM LoginTB WHERE username ='" +
txtUserName.Text + "'"
Adodc1.RefreshIf (Adodc1.Recordset.EOF = False) Then If (txtPassword.Text = Adodc1.Recordset.Fields
("Password")) Then
MsgBox ("Login Successful")
Else
MsgBox ("Login Failure. Incorrect Password")
End If
Else
MsgBox ("Login Failure. Username does not exist.")
End If -
How to display on the form automatically the user that logins in a VB programHow can I display automatically the username of a user that login to a Visual basic 6.0 application on the form
-
VB code to disable save button after saving a formPlease I will like to know if this code written is okay. seems to be having error. The aim is to prevent user from making any changes on form after saving.
CUSTOMER RESERVATION BILLLING (cmdSave, Command2)
If cmdSave.Caption = "Save" Then
Adodc1.Recordset.AddNew
txt.SetFocus
'Disenablebuttons
cmdsave.Enabled = True
cmdAddNew.Caption = "Cancel"
cboClassofRoom.Locked = False
txtCustomer_Name.Locked = False
txtRoomNo.Locked = False
txtCustomer_Address.Locked = False
txtPhone_number.Locked = False
txtAmountPaid.Locked = False
txtCheckin.Locked = False
txtDuration.Locked = False
txtDate.Locked = False
txtReceptionist.Locked = False
Else
Adodc1.Recordset.CancelUpdate
cmdsave.Enabled = False
cmdAdd.Caption = "Add"
'enablebuttons
cboClassofRoom.Locked = True
txtCustomer_Name.Locked = True
txtRoomNo.Locked = True
txtCustomer_Address.Locked = True
txtPhone_number.Locked = True
txtAmountPaid.Locked = True
txtCheckin.Locked = True
txtDuration.Locked = True
txtDate.Locked = True
txtReceptionist.Locked = True
End IF
End Sub -
How can I disable a Save button or Print Buttton after saving a form in Visualbasic 6.0Thanks for the response. Meanwhile I am trying to upgrade to VB.net Pending when I wish to still ask based on your response. How do I write the VB code to set its enabled property to false only after saving/printing a form. The aim is to prevent user from modifying or printing same form. Thanks in advance
-
How can I disable a Save button or Print Buttton after saving a form in Visualbasic 6.0Please how can I disable a Save button after a user submits a form, the aim is to prevent user from modifying any changes after saving on the form in visual basic 6.0. Same with Print button, after a user prints a form, how can i disable the form so the user cannot print that particular form on the same visual basic 6.0. I will be so grateful for you response. Damian