scripterdx Posted November 25, 2009 Share Posted November 25, 2009 i´m a bit confusede, i´ve made a very simple mysql query, to show logged users (via Sessions), gets the user id and shows the email linked to that id. <?php $jbl ="SELECT `email` FROM `usuarios` WHERE `id` = '$user_id'"; $con = mysql_query($jbl); $fila = mysql_fetch_assoc($con); $emilio = $fila['email']; ?> that works prefectly on my localhost (appserv) but on my real server the one where my site is, it dosen´t works. yes th DB is the same. thanks Link to comment https://forums.phpfreaks.com/topic/182927-works-on-my-localhost-but-not-on-other-sites/ Share on other sites More sharing options...
mrMarcus Posted November 25, 2009 Share Posted November 25, 2009 where is $user_id coming from? need more code than just the query. "it doesn't works" isn't sufficient information to help solve a problem. i can't use that for any troubleshooting. would you bring your car into a mechanics, toss him the keys and say, "it doesn't works"? no. post your code, explain what is happening and what should be happening. post any error messages. add: or trigger_error (mysql_error()); to the end of your query: $con = mysql_query($jbl) or trigger_error (mysql_error()); and add: ini_set ('display_errors', 1); error_reporting(E_ALL); to the very top of your script. Link to comment https://forums.phpfreaks.com/topic/182927-works-on-my-localhost-but-not-on-other-sites/#findComment-965520 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.