Jump to content

Query not working !!!


Sorrow

Recommended Posts

Ok here's the deal I have this code [code]<?php

$Valeur = $_Post["Username"];

$con = mysql_connect("localhost", "db_user", "db_pass") or die(mysql_error());

mysql_select_db("db_name", $con);

$result = mysql_query("SELECT * FROM Usagers WHERE Username =  '". $Valeur . "'" );[/code]

When I replace this part ( '". $Valeur . "'" ) by the value of a username in my database it is working all the infos i am asking i have them but when i go from the login page and try to send the value to : $_Post["Username"] their is nothing that shows up. And yes all the fields are name the same.
Link to comment
https://forums.phpfreaks.com/topic/28276-query-not-working/
Share on other sites

What is you forms submit method? This is defined in the form tag via the method attribute.

Also little confused about your last post. What do you mean [b]already checked this[/b].

$Valeur = $_Post["Username"]; should be $Valeur = $_POST["Username"];
Link to comment
https://forums.phpfreaks.com/topic/28276-query-not-working/#findComment-129697
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.