answersLogoWhite

0


Best Answer

where clause is related to mysql. If you mention the sql line here it will be easy to know more on this.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is wrong with your php where clause for user login?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

You use a Html button in Php on its onclick you made a function but its not responding?

this is not really a question... But I think you are asking why php functions inside a HTML button do not work. Well probably because php is rendered serverside and is passed to a user-browser afterwards.... it is possible to use php inside onclick... but only to display specific content (javascript function for instance)... it is not possible to let a user decide to run a specific php function by clicking a button.


Why is PHP better than JSP?

in the past ive found jsp to be much slower than PHP (correct me if im wrong) PHP is a solid stable web language and much faster in my opinion :D


What is PHP used for?

PHP is a programming language that is used to generate dynamic web pages based on user requests and other data that changes such as store inventory, current news, or time of day.


What is the difference between PHP and CGI?

The benefits of running PHP-CGI are:** It is more secure. The PHP runs as your user rather than dhapache. That means you can put your database passwords in a file readable only by you and your php scripts can still access it!* It is more flexible. Because of security concerns when running PHP as an Apache module (which means it runs as our dhapache user), we have disabled a number of commands with the non-CGI PHP. This will cause installation problems with certain popular PHP scripts (such as Gallery) if you choose to run PHP not as a CGI!* It's just as fast as running PHP as an Apache module, and we include more default libraries.There are a FEW VERY MINOR drawbacks to running PHP-CGI. They are:** Custom 404 pages won't work for .php files with PHP-CGI. Or will they? See n74's comment below!* Variables in the URL which are not regular ?foo=bar variables won't work without using mod_rewrite (http://httpd.apache.org/docs/mod/mod_rewrite.html) (example.com/blah.php/username/info/variable).* Custom php directives in .htaccess files (php_include_dir /home/user;/home/user/example_dir) won't work.* The $_SERVER['SCRIPT_NAME'] variable will return the php.cgi binary rather than the name of your script* Persistant database connections will not work. PHP's mysql_pconnect() function will just open a new connection because it can't find a persistant one.If one of those is a show-stopper for you, you can easily switch to running PHP as an Apache module and not CGI, but be prepared for a bunch of potential security and ease-of-use issues! If you don't know what any of these drawbacks mean, you're fine just using the default setting of PHP-CGI and not worrying about anything!


How do you create function in php?

they're called user-defined functions, this is the syntax: function the_user_defined_name() { the code you want here }

Related questions

How do you check user is login or not in php?

// Check if $_SESSION['username'] is not blank <?php Session_start(); if ($_SESSION['username'] == "") { header('location: login.php'); } else { echo " User logged in "; } ?>


Where can one find a guide on how to make a login php script?

The best place to find a guide on how to make a login script in php is the PHP Easy Step website. They offer a step by step tutorial on how to create login scripts.


How do you select data associated with a logged in user from your sql davabase using php?

Assuming you have the same table for the user-details and login. Also that you have got the login part working <?php // connection string statement // select database statement // check if user is present in db $user = 'user_name'; // put the value of username obtained from login $select = mysql_query("SELECT * FROM table_name WHERE user='$user'"); // if statement will check for single user before showing data if(($fetch = mysql_fetch_array($select))&&($select>0)&&($select<2)) { // only print the columns you want to show echo $fetch['col_1']; // where col_1 is the name of column echo $fetch['col_2']; } ?>


Can HTML tags code and text be included in a php code?

Yep. We do it all the time. One way is to simply tell PHP that you want the tags echoed. Like so: <?php echo('<b>Hi</b> Nice to meet you!'); ?> Sometimes you want instead to simply use the PHP in parts of a page and leave the rest. You can do this, too. <body> <div class="login"> <?php if($user->loggedIn()){ ?> <b>Hi!</b> <?php }else{ ?> <!-- HTML FORM HERE --> <?php } ?> </div> </body>


What is a form in HTML?

A form is used to submit user data. Some examples of a form is a user login, question forms, or anywhere else where you can type and hit "submit". The most common way for the information to be processed is through PHP which is a server side script.


What is the php hosting?

Php hosting is a popular scripting language in which produces dynamic web pages. An example of a dynamic web page is Facebook. Facebook needs php hosting as it has a login page. Shopping pages are also php hosted.


How do you make a login using PHP?

Create an HTML form with METHOD="post" and ACTION="login2.php". In login2.php check if the entered username and password are correct. You can get the username with $_POST['name_of_username_input']. The same goes for the password.


Login code for HTML?

If you mean how to create a login code with HTML, you need a tag called and a tag called and something in another programming language, such as php or java. There is no login code necessary to use HTML.


How can you make your website have login and registration forms that work together?

This is usually done through PHP, which is a scripting language. If you are looking for a forum with login and registration, there are several programs around for free that you can use. Otherwise if you need something other than a forum, you will probably need to learn PHP which can take weeks to learn and years to master. I would suggest searching for PHP code or getting a book on learning PHP.


How do you transfer money from PayPal to PayPal using PHP?

As far as I'm aware you can't transfer from one account to another using a PHP script, you would have to login and do it manually.


What is the source code for sample login by php language?

This is completely basic login script. you'll definitely have more users(so user database in mySql or a file) and also security and session control stuffs. <?PHP if(isset($_POST['submit'])) { $userName=trim($_POST['userName']); $passWord=$_POST['passWord']; if($userName=="yourName" and $passWord=="yourPassword") { //Contents for logged in user goes here echo 'You are logged in to view protected contents!'; } } echo '<form method="post"> Username : <input type="text" name="userName" /> Password : <input type="password" name="passWord" /> <input type="submit" name="submit" value="Login"> </form>'; ?>


How do you represent a variable in PHP?

Variables in php begin with $ and are declared by the user. $str1 = "wiki"; would store "wiki" into the variable $str1