cab Posted September 11, 2006 Share Posted September 11, 2006 Don't ask why i'm doing my email address this way :) (problems storing it normally) but anyways....echo "<tr> <td align='right'> <B>Email</br></td> <td><input type='text' name='email1' size='30' maxlength='65' > @ <input type='text' name='email2' size='26' maxlength='65' ></td> </tr>"; $expemail = $_POST['expemail1']."@"; $expemail .= $_POST['expemail2'];Will this code above combine "email1" and "email2" into the variable "email" which can then be stored in the database?Please advise...... Link to comment https://forums.phpfreaks.com/topic/20395-combining-data/ Share on other sites More sharing options...
ToonMariner Posted September 11, 2006 Share Posted September 11, 2006 $expemail = $_POST['email1']."@";$expemail .= $_POST['email2'];willjust use addslashes if you are having probs storing in the db. Link to comment https://forums.phpfreaks.com/topic/20395-combining-data/#findComment-89840 Share on other sites More sharing options...
cab Posted September 11, 2006 Author Share Posted September 11, 2006 I'm sorry i'm really new at PHP and i'm kind of self-teaching from a book i bought.What exactly are "addslashes" Link to comment https://forums.phpfreaks.com/topic/20395-combining-data/#findComment-89841 Share on other sites More sharing options...
shocker-z Posted September 11, 2006 Share Posted September 11, 2006 Just to add to the above this should also work..$expemail = $_POST['expemail1']."@".$_POST['expemail2'];but this would be a safer option also$expemail = mysql_real_escape_string($_POST['expemail1']."@".$_POST['expemail2']); This will escape alot a bas stuff before you insert into your DBRegardsLiam Link to comment https://forums.phpfreaks.com/topic/20395-combining-data/#findComment-89843 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.