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...... Quote Link to comment 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. Quote Link to comment 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" Quote Link to comment 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 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.