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!"; ?> 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? 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. 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? 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 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! Link to comment https://forums.phpfreaks.com/topic/98647-php-newsletter/#findComment-504864 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.