dezkit Posted March 30, 2008 Share Posted March 30, 2008 hey guys, im new to mysql/php and im wondering how why when i look at my database(or table, whatever it is called), it shows only the first 2 letters of my ip <?php $email = $_POST['email']; $ip = $_POST['ip']; mysql_connect("mysql", "dezkit", "xxxxxx") or die(mysql_error()); mysql_select_db("newsletter") or die(mysql_error()); mysql_query("INSERT INTO users (email, ip) VALUES('$email', '$ip' ) ") or die(mysql_error()); echo "Thank you for registering for our newsletter!"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/98647-php-newsletter/ Share on other sites More sharing options...
dezkit Posted March 30, 2008 Author Share Posted March 30, 2008 anyone? Quote Link to comment https://forums.phpfreaks.com/topic/98647-php-newsletter/#findComment-504842 Share on other sites More sharing options...
unidox Posted March 30, 2008 Share Posted March 30, 2008 make sure the db table is not int, but varchar. Quote Link to comment https://forums.phpfreaks.com/topic/98647-php-newsletter/#findComment-504848 Share on other sites More sharing options...
dezkit Posted March 30, 2008 Author Share Posted March 30, 2008 how do i do that? Quote Link to comment https://forums.phpfreaks.com/topic/98647-php-newsletter/#findComment-504860 Share on other sites More sharing options...
unidox Posted March 30, 2008 Share Posted March 30, 2008 phpMyAdmin Quote Link to comment https://forums.phpfreaks.com/topic/98647-php-newsletter/#findComment-504863 Share on other sites More sharing options...
dezkit Posted March 30, 2008 Author Share Posted March 30, 2008 i got it, thanks alot man! Quote Link to comment https://forums.phpfreaks.com/topic/98647-php-newsletter/#findComment-504864 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.