php
im beginner to php. i faced problem with creating form and data stored into mysql
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Form Input Data</title>
</head>
<body>
<table border="1">
<tr>
<td align="center">Form Input Employees Data</td>
</tr>
<tr>
<td>
<table>
<form method="post" action="input.php">
<tr>
<td>Name</td>
<td><input type="text" name="name" size="20">
</td>
</tr>
<tr>
<td>User name</td>
<td><input type="text" name="username" size="20">
</td>
</tr>
<tr>
<td>Password</td>
<td><input type="Password" name="pwd" size="20">
</td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" size="20">
</td>
</tr>
<td></td>
<td align="right"><input type="submit"
name="submit" value="Register"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
i have created table in mysql
create table data_employees(name char(20),username char(20),pwd char(20),email char(20),PRIMARY KEY(username));
<?
//the example of inserting data with variable from HTML form
//input.php
mysqli_connect("localhost","root","","test");
//inserting data order
$order = "INSERT INTO data_employees
(name,username,pwd,email)
VALUES
('$name',
'$username'.'$pwd','$email')";
//declare in the order variable
$result = mysql_query($order); //order executes
if($result){
echo("<br>Input data is succeed");
} else{
echo("<br>Input data is fail");
}
?>
but the out put will displayed like this and dosnt insert the data into table
Input data is succeed");
Input data is fail");?>
View Answers
Ads
Related Tutorials/Questions & Answers:
php
php what is
php
PHP Tutorials
Advertisements
php
php using javasript how to set timer in
php using javasript
php
php i want to know about
php
and
php plateform
required software to make
php program and
database that used in
php program?
Please visit the following link:
PHP database
php
php i want to know about
php
and
php plateform
required software to make
php program and
database that used in
php program?
Please visit the following link:
PHP database
php
php show the constructor overloading in
php
PHP
PHP How to work in drupal with
PHP
php
php what is
php
PHP is one of the most used open source server-side scripting language, which runs on almost all the platform.
PHP... and Solaris.
To know more about
PHP,
Visit Here
php
php how to write a program in
php to create pdf file
php
php plz tell me code for
PHP SQL Insert,delete,update,view is used to insert the record from HTML page to Mysql database using in single
PHP form
php
php retrieve data from mysql in
php
Please visit the following links:
http://www.roseindia.net/sql/mysql-table/mysql-
php-select.shtml
http://www.roseindia.net/sql/mysql-example/select-where.shtml
php
php How to catch a image and link click counters using Ajax
php can any one help me
php
php how to set email remainder in
php?can you help me pls
PHP
PHP I want to create Calendar Event in
PHP. Could u help me
PHP
PHP How to check whether a username exists on a website using
php and cURL and not MySQL
php
Write a simple
PHP program that display the days of week as per the system date using switch case statement. Write a simple
PHP program that display the days of week as per the system date using
switch case statement
PHP
PHP I would love to do
PHP project with the title of "Hospital Management System". I want to know how to make validation using jquery
php
can learn
php mysql connectivity examples from the given link:
PHP Mysql Connectivity
php
shortcut method in
php like in javscript seletedIndex
php
php im beginner to
php. i faced problem with creating form and data stored into mysql
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<
php
php im beginner to
php. i faced problem with creating form and data stored into mysql
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<
Replace String in PHP - PHP
Replace String in PHP What is the fastest way of replacing string in
PHP Code? Hi Friend,
Please visit the following link:
http://www.roseindia.net/tutorial/
php/phpbasics/
PHP-Array-Replace.html
Thanks
PHP and JQuery
PHP and JQuery How to make validation using
PHP and JQuery
PHP Tutorial
PHP Tutorial Hi,
I am new in
PHP programming. Can anyone provide me good urls to learn
PHP?
Thanks
Hi,
Start learning
PHP at
PHP Tutorial section.
Thanks
PHP Tutorial
PHP Tutorial Hi,
I am looking for
PHP tutorials on roseindia.net. Provide me the urls of
PHP tutorials?
Thanks
Hi,
Here is the links on roseindia.net
PHP Tutorial
Complete
PHP Tutorials
Many Free
PHP Tutorials
PHP with AJAX
PHP with AJAX I want to update records of table in database using AJAX
PHP MySQL.
How can this be done using AJAX.
Please visit the following links:
http://www.roseindia.net/
php/
php-Ajax-DB.shtml
http
php functions
php functions hi sir, we give some egs those not produce the results... at the following links:
http://www.roseindia.net/tutorial/
php/phpfunctions/index.html
http://www.roseindia.net/tutorial/
php/phpbeginners/
php-functions.html
PHP
What's PHP ?
What's
PHP ? What's
PHP ?
Hi friends,
PHP stands... developers to create dynamic content that interacts with databases.
PHP is basically used for developing web based software applications.
Basic syntax:
A
PHP