Search found 31 matches
- Sat Dec 01, 2007 8:55 am
- Forum: Databases
- Topic: PHP/MySQL Query Problem!
- Replies: 7
- Views: 735
- Thu Nov 29, 2007 8:37 am
- Forum: Databases
- Topic: PHP/MySQL Query Problem!
- Replies: 7
- Views: 735
- Thu Nov 29, 2007 8:08 am
- Forum: Databases
- Topic: PHP/MySQL Query Problem!
- Replies: 7
- Views: 735
- Thu Nov 29, 2007 6:43 am
- Forum: Databases
- Topic: PHP/MySQL Query Problem!
- Replies: 7
- Views: 735
PHP/MySQL Query Problem!
hi all trying to execute a query and display items that have been updated within the past week. am pretty sure the query itself is correct but its throwing the following error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/kumar/public_html/Storm Broadban...
- Wed Nov 07, 2007 9:58 am
- Forum: PHP - Code
- Topic: Form Validation
- Replies: 3
- Views: 343
- Wed Nov 07, 2007 9:25 am
- Forum: PHP - Code
- Topic: Form Validation
- Replies: 3
- Views: 343
Form Validation
Hi I am trying to validate my form. Ive read a few books and none tell you how to validate a form before it gets sent to a database. how would I go about validating my form. I want to it to be client side validation using javascript. this is the code i have for inserting data into database via form:...
- Wed Nov 07, 2007 9:25 am
- Forum: PHP - Code
- Topic: Form Validation
- Replies: 0
- Views: 106
Form Validation
Hi I am trying to validate my form. Ive read a few books and none tell you how to validate a form before it gets sent to a database. how would I go about validating my form. I want to it to be client side validation using javascript. this is the code i have for inserting data into database via form:...
- Thu Oct 25, 2007 1:09 pm
- Forum: PHP - Code
- Topic: session not working
- Replies: 11
- Views: 1746
- Thu Oct 25, 2007 4:34 am
- Forum: PHP - Code
- Topic: session not working
- Replies: 11
- Views: 1746
hey stryks. i restructured the code which eliminates the need for ob_start. but still no luck redirecting non logged users to logged in page. that aside. i looked into the hashed passwords. Am i right in thinking that I would actually have to send the passwords using md5. via a php form. for example...
- Thu Oct 25, 2007 4:27 am
- Forum: PHP - Code
- Topic: header location problem
- Replies: 6
- Views: 911
- Wed Oct 24, 2007 6:13 pm
- Forum: PHP - Code
- Topic: session not working
- Replies: 11
- Views: 1746
thanks for the reply. if i use the code you presented i get the following error when logging in: Warning: Cannot modify header information - headers already sent by (output started at /home/kumar/public_html/Storm Broadband/myaccount.php:15) in /home/kumar/public_html/Storm Broadband/myaccount.php o...
- Wed Oct 24, 2007 5:56 pm
- Forum: PHP - Code
- Topic: session not working
- Replies: 11
- Views: 1746
its still not working. ive placed the code in the useraccount.php like so: <?php session_start(); ob_start(); if (!isset($_SESSION['logged']) || $_SESSION['logged'] !== true) { // not logged in, move to login page header('Location: myaccount.php'); exit; } session_write_close(); ob_end_flush(); ?> h...
- Wed Oct 24, 2007 3:38 pm
- Forum: PHP - Code
- Topic: session not working
- Replies: 11
- Views: 1746
session not working
Hi i have a login form , once logged in it takes the users to another page (useraccount.php). ive set the session, however i can still access useraccount.php without logging in. why is this happening login form code: session_start(); include 'dbconnect.php'; if(isset($_POST['submit'])) { if(mysql_nu...
- Wed Oct 24, 2007 12:28 pm
- Forum: PHP - Code
- Topic: login script
- Replies: 7
- Views: 508
thanks that sorted it. i forgot to add the password.
ive prevented sql injection on my insert statements e.g.
but how would i apply them to my login script?
thanks again
ive prevented sql injection on my insert statements e.g.
Code: Select all
VALUES ('" . mysql_real_escape_string($userid) . "', '" . mysql_real_escape_string($subject) . "',...thanks again
- Wed Oct 24, 2007 11:14 am
- Forum: PHP - Code
- Topic: login script
- Replies: 7
- Views: 508