mizraabi Posted July 23, 2008 Share Posted July 23, 2008 hi guys i want to knw tht how do i get one row record from more than one input fields for example i want to get the Name of a person i m getting it like First Name,Last Name,Title,Suffix now i want to store them in one row in the MySql table. I tried to do tht by giving the same name to all the input fields but tht overwrites the previous record. Plz help Quote Link to comment Share on other sites More sharing options...
secoxxx Posted July 23, 2008 Share Posted July 23, 2008 Why dont you make seperate rows: first_name, last_name, ect..... and echo out in a line. <?php echo $first_name; ?> <?php echo $last_name; ?> Then you are more free to do things in the future, like "Welcome! Joe" insted of "Welcome! Joe Blow Title Suffix" Quote Link to comment Share on other sites More sharing options...
mizraabi Posted July 23, 2008 Author Share Posted July 23, 2008 well i just need to store the data dont want to echo it ! just wana keep in db. tel me how do i do tht? Quote Link to comment Share on other sites More sharing options...
secoxxx Posted July 23, 2008 Share Posted July 23, 2008 Cant help you there, maybe one of the other guys know how to connect inputs. Quote Link to comment Share on other sites More sharing options...
accident Posted July 23, 2008 Share Posted July 23, 2008 uhhh create more then one column in your table? This is the most basic database question.. I HIGHLY recommend you read up on databases. Create a table with the fields you need, then when you insert do INSERT INTO whatever VALUES(firstname,lastname) etc... Quote Link to comment Share on other sites More sharing options...
mizraabi Posted July 24, 2008 Author Share Posted July 24, 2008 didnt get it man ? tel me how to do it in MySql. I want to join the input of two fields in a single row . i dont want to put it into columns Quote Link to comment Share on other sites More sharing options...
fenway Posted July 24, 2008 Share Posted July 24, 2008 I want to join the input of two fields in a single row What does thsi mean? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 26, 2008 Share Posted July 26, 2008 didnt get it man ? tel me how to do it in MySql. I want to join the input of two fields in a single row . i dont want to put it into columns Explain what you mean by fields. Do you mean an HTML field? Or a field in your database? If its an HTML field then all data submitted to the page from a form is handled by PHP. Form data is usually stored in the $_POST super global (depends on your forms submit method), eg $_POST['form_field_name'] To join the two variables into one you'd use concatenation, eg $full_name = $_POST['First_Name'] . ' ' . $_POST['Last_Name'] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.