How Build Html form ? Programming by Kirubel_2 …; <input type="text" name="firstname" placeholder="Enter Your firstname"> </div> <div… lblMessage Need to Retrieve FirstName and LastName code-behind Programming Software Development by codewar … and set welcome message if it exists string firstName = (string)Session["FirstName"]; if (firstName != null) { lblWelcome.Text = "Welcome back, "… Parameterized Query '(@name varchar(8000))select firstname,image from register where Programming Web Development by mith_cool …= new SqlCommand(); cmd.CommandText = "insert into register(firstname,lastname,loginname,password,image,securityq,securitya,email,location)" + &…; cn.Open(); SqlCommand cmd = new SqlCommand("select firstname,image from register where loginname=@name"); //cmd.CommandText … Re: Parameterized Query '(@name varchar(8000))select firstname,image from register where Programming Web Development by kvprajapati [b]>if i need to retrieve the image of a particular user not all the users in the database what am suppose to do then.[/b] [code=text] select firstname,image from register where loginname=@name [/code] Re: error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by broj1 …to minimize a chance of SQL injection) $firstname = mysql_real_escape_string($_POST[firstname]); $lastname = mysql_real_escape_string($_POST[lastname]); //…your query $sql="INSERT INTO users(firstname, lastname) VALUES ('$firstname','$lastname')"; ... ... mysql_close($con);… Re: error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by SirMahlon … values (to minimize a chance of SQL injection) $firstname = mysql_real_escape_string($_POST['firstname']); $lastname = mysql_real_escape_string($_POST['lastname']); // then use …in your query $sql='INSERT INTO users(firstname,lastname) VALUES ("$firstname","$lastname")'; if (!mysql_query($… $sql = "SELECT Id, FirstName, LastName FROM mydb"; doesn`t work Programming Web Development by Latrell_vie …} echo "Connected successfully" $sql = "SELECT Id, FirstName, LastName FROM mydb"; $result = $conn->query($sql); ?&…} echo "Connected successfully" $sql = "SELECT Id, FirstName, LastName FROM mydb"; $result = $conn->query($sql); if… Converting First Letter in Uppercase i.e Firstname and Lastname Programming Software Development by geetajlo Hi i want to convert only the first letter of a firstname n his lastname seperating by a space. Note every time he/she input firstname the first letter should be Uppercase and when she/he press the space bar the last name only the first letter should be Uppercase. Help Me Plzzzz Ex: Geeta Lopez ERROR 1054 (42S22): Unknown column 'Firstname' in 'field list' Programming Databases by lewashby ERROR 1054 (42S22): Unknown column 'Firstname' in 'field list' I'M gettin the above error when … enter: mysql> insert into people (fname, lname) -> VALUES (Firstname, Lastname); Here's the table: mysql> desc people; +-------------+-------------+------+-----+---------+-------+ | Field… error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by SirMahlon …("mydb", $con); $sql="INSERT INTO users(firstname, lastname) VALUES ('$_POST[firstname]','$_POST[lastname]')"; if (!mysql_query($sql,$con)) { die… Re: error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by broj1 Sory, my mistake, forgot the quotes in array indexes. This is correct: $firstname = mysql_real_escape_string($_POST['firstname']); $lastname = mysql_real_escape_string($_POST['lastname']); Re: error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by broj1 … in your original post): die("INSERT INTO users(firstname, lastname) VALUES ('$firstname','$lastname')"); This will display the constructed query and… Re: error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by broj1 … array so change the form to: Firstname: <input type="text" name="firstname" /><br><… Re: $sql = "SELECT Id, FirstName, LastName FROM mydb"; doesn`t work Programming Web Development by PsychicTide …)... $result->execute(); $result->store_result(); $result->bind_result($id, $FirstName, $LastName); while ($result->fetch()) { # some random output here... } $count… Re: JButton, states Welcome, FirstName & LastName Programming Software Development by justindill ….TitledBorder; public class Now extends JFrame { //Create text fields for FirstName, LastName, and Age private JTextField jtfFirstName = new JTextField(); private JTextField…true); } } Okay, I need help pulling the values from the FirstName and LastName textfields to output once the user hits the… Re: JButton, states Welcome, FirstName & LastName Programming Software Development by justindill …); } class SubmitListener implements ActionListener{ public void actionPerformed(ActionEvent e){ String FirstName = jtfFirstName.getText(); String SurName = jtfLastName.getText(); WelcomeMessage.setText("Welcome… Re: ERROR 1054 (42S22): Unknown column 'Firstname' in 'field list' Programming Databases by pritaeas Missing quotes: insert into people (fname, lname) VALUES ('Firstname', 'Lastname'); Re: error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by SirMahlon if(isset($_POST[firstname]) and isset($_POST[lastname])) { Re: error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by broj1 OK, the quotes are missing in this line also. Try: if(isset($_POST['firstname']) && isset($_POST['lastname'])) { Re: error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by SirMahlon … action="insert.php" method="post"> Firstname: <input type="text" name="fname"… Re: error inserting data.undefined index firstname/lastname on line 14 Programming Web Development by SirMahlon … action="insert.php" method="post"> Firstname: <input type="text" name="fname"… pull firstname and lastname from database Programming Web Development by freshfitz ….Text = Application["activeUsers"].ToString(); (I WANT LABEL3.TEXT = FIRSTNAME , LASTNAME FROM MY DATABASE) } else { Response.Redirect("./Login.aspx… JButton, states Welcome, FirstName & LastName Programming Software Development by justindill ….ActionListener; import javax.swing.*; public class Now extends JFrame { JLabel FirstName; JTextField jtfFirstName; JLabel LastName; JTextField jtfLastName; JLabel Age; JTextField jtfAge… Re: JButton, states Welcome, FirstName & LastName Programming Software Development by DavidKroukamp … javax.swing.*; > public class Now extends JFrame { > JLabel FirstName; > JTextField jtfFirstName; > JLabel LastName; > JTextField jtfLastName; >… Re: JButton, states Welcome, FirstName & LastName Programming Software Development by justindill ….TitledBorder; public class Now extends JFrame { //Create text fields for FirstName, LastName, and Age private JTextField jtfFirstName = new JTextField(); private JTextField… Problem with displaying firstname Programming Web Development by jboonpradab … = mysql_fetch_array($result) $name = $row['fname']; session_start(); $_SESSION['auth'] = 1; $_SESSION['firstname']=$name; header("Location: useraccount.php"); } else { //echo } ?> How to add an apostrophe s to ~Contact.FirstName~ Programming Web Development by lisag6 Hi - We have this line ~Contact.FirstName~ in our subject line for an email. We need to add an 's at the end to make it plural. So it would read Joe's instead of just Joe. FirstName Validation Problem Programming Web Development by keval_hack Hi, I want to make a php validation for textbox which limit user to enter only character. i using following code [CODE]function validate_alpha($val) { return eregi("[^0-9]",$val); } [/CODE] if i type 123 it will give error. that is ok. but when i type keval123 it doesn't produce error. how to solve this … Re: FirstName Validation Problem Programming Web Development by Devoted Hosting Just one character? So "a" or "3", but not "ab" or "3r" etc? If so, just do: [code=php] if( strlen($val) == 1 ) { // Fine } else { // Error } [/code] Or do you mean something else? :) Re: FirstName Validation Problem Programming Web Development by navdeep7489 Use ctype_alnum() function to check the input data. I give you an example code: function validate_alpha($val) { if(ctype_alnum($var)) return "string is accepted."; else return "string is not accepted"; }