What is the error in the below code ???
Line number On/Off | Expand/Contract <?php if(array_key_exists_r('email|password', $_POST)) { include_once('database.php'); $sql = "SELECT user_id FROM login WHERE user_name = '" . trim($_POST['email']) . "' AND password='" . trim($_POST['password']) . "')"; $result = mysql_query($sql); print_r($result); if (mysql_num_rows($result)>0){ $row = mysql_fetch_row($result); session_start(); $_SESSION['user_id']=$row[0]; $_SESSION['user_name']=trim($_POST['email']); } }?>
asking for direction
I have 2 tables in my data, which are "post" and "event"I won't make a summary page for showing the condition of these two tables.so what I am thinking is SELECT the fields inside
Database 'Validation'
Hi everyone,I'm trying to validate the password entered by the user with the password in the database. I've worked out that it checks the username fine (if the username doesn't exist it displays an
drop-down with sub-category appear
Hello,i know how to build a simple dro-down list, im looking for a code when im gonna choose from the select box something a new drop-down will appear next to the default one with
pagination numbering pattern
Hello,I have following code which works great for pagination. but i have small issue now.Now the output is coming like this Quotemypage.php?page=2I want it like thisQuotemypage.php/2code-Code:
preg_match logical error
Code: <?php$s = file_get_contents("page.html");preg_match('/<div class="brown_box main_ge_page vertically_spaced"><div
Output Full URL of Current Page
Let's say I am currently viewing a dynamic page: http://www.mydomain.com/directory/index.php?type=flowers I want this URL to be output on the page, but not including the end parameters.
Need help-Error istream header declaration
Hi Everyone ,I am having issue with istream declaration. I am new to C programming.can any one please help me ?I am getting error in getNameValuePair.h and getNameValuePair.C code.Here below the
Am I setting up my sites oldschool?
Ok,When I create a site I open a basic template that I have created that consists of a css file an index page and a few php inserts for the header, nav and footer.It works fine and I am happy with it
Taking an HTML form and a PHP program and making it into one working file.
Hello, So I would like to display everything INSIDE a specific directory. In other words, I would like to display all file name's inside all subfolders in a specific directory. (NOT the subfolder
Call to undefined function mysql_fetch_accoc()
New to php/mysql coding. What's wrong with this sequence, or am I just not seeing to obvious?Getting, "Call to undefined function mysql_fetch_accoc()" at line n, whereline n is referring to