I am having a small problem with my sql statement. it is inserting into 4 of the fields.
fields it is inserting into:
First
Last
email
password
it is saying the record has been added. is there something wrong with the sql statement?
Code: <?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="95887rj"; // Mysql password
$db_name="bccsl"; // Database name
$tbl_name="managers2"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql = sprintf("INSERT INTO Managers (First, Last, Address, City, Postal, Home, Cell, Email, Password, Church, Team)VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",$_POST['firstname'],$_POST['lastname'],$_POST['address'],$_POST['city'],$_POST['postal'],$_POST['home'],$_POST['cell'],$_POST['email'],$_POST['password'],$_POST['church'],$_POST['team']);
if (!mysql_query($sql))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
?>
Update Database
Hi All,I have a problem with this:Code: [Select]<?phpsession_start();include('../common/dbconnect.php');$stock_id = $_GET['stock_id'];$query='SELECT * FROM users_stocks WHERE user_id ="' .
Setting/Modify Headers using mail() function
I have a question about setting email headers when using mail() in a php script.When I send an email from an email account set up domain (using, for example, xxx@MyDomain.net) and then view the header
Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data update current data or delete old data from tempproducts to products then it will delete the
help with database debug pls
Parse error: syntax error, unexpected T_ELSE in /home/content/m/e/s/mesick/html/students/05/php/checklogin.php on line 13<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
Help with Contact Form
I have this Form on an html page and the associated code on page.php (below).I keep getting the "Please Fill In All Fields" message. Can you help me fix this?I'm sure I'm just missing
moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.I'd like to be able to move the mouse within that image & display the correct image coordinates to the user.How difficult
How can I get my program to read a larger array ??
Hi:
PHP Tab Control
Hi All,I would like to have PHP tab control with/without Javascript. But I want to retrieve some information from database server when clicking on a tab. Any body had used this kind of tab?Any help
captcha error
I have been trying to implement a captcha in php...here is the code..Code: (php) [Select]<?php// Set the content-typeheader('Content-type: image/png');// Create the image$im =
problem in pagination when processing with selectbox form
Hi,I have a search form, with select boxes, if am selecting the value from the form, it works good, but when i am integrating the pagination script, it messed up.this is my script...please help me