Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.