User Profile
Collapse
-
Many Thanks that was just what I was looking for, implimented it and its working great! -
Mysql Storing Encrypted Data : Data Type And Field Lengths?
I have created a database and I want to add a field to it which will store the password using the php encryption method of MD5 or SHA1
I just simply need to know what datatype to use in the database for storing this type of information as I dont want data to be rejected or cut off because of field lengths.
I would expect to encrypt something like "this is test" in PHP and it be stored in the database table... -
Heres my finished code:
Code:<?php $FAILED = "0"; $COMP01 = $_POST['COMP1']; $IFADDR1 = $_POST['IFADDR1']; $IFADDR2 = $_POST['IFADDR2']; $IFADDR3 = $_POST['IFADDR3']; $IFADDR4 = $_POST['IFADDR4']; $TELENO = $_POST['TELENO']; $PC = $_POST['PC']; $EMAILADD = $_POST['EMAILADD']; $WEB = $_POST['WEB']; $DESC = $_POST['DESC']; $TYPE
Leave a comment:
-
I'm sort of figuring it out now.... but I noted that it picks up spaces so i'm just looking at other examples of the function to try and work out how I ignore the space also...Leave a comment:
-
It is now, I was trying to get it so that if it found invalid chars it would just replace them as well but I think i've messed up combining the 2 functions now ...eek...Leave a comment:
-
I am going with the code which markusn00b suggested but I want to be able to pick up apostrophe's using it, is there any way of doing that because I understand they are the basis of most SQL injection attacks.
I dont need the javascript now as I found a website and viewed the source code which gave me all the stuff I needed ;)Leave a comment:
-
Hi,
Thanks guys both great and thats helped me alot. I was wondering can the 2nd one be integrated into the original form so as to alert the user "as they are completing the form".
I'm using dreamweaver and I see that there is a property for behaviours where you can set it onblur to run a javascript. Any ideas whether I could get it to run the PHP code? I'm thinking not as it is SSL but maybe you have some...Leave a comment:
-
Removing unwanted characters from users input
I have a HTML page which posts information to a PHP page which contains a query for mysql to add records to a database
I want to strip all special characters and only allow 0-9 and a-z but also allow an email address field and a website address field.
I have been trawling through the web for days and it seems there are many ways of doing this but I am very confused.
This is to prevent from SQL injection... -
daknightuk replied to Php Scripting : Mysql Time format and PHP Calc based on opening hours in databasein PHPheres what i've come up with, maybe someone can suggest where it might not work or a better way of coding it?
Code:<?PHP // this code determines what the current date and time is and compares it to the businesses opening hours (assuming that there is a lunch hour also $timestamp = time(); $currentday = date("D",$timestamp); $currenttime=date('H:i'); $output="OPEN
Leave a comment:
-
daknightuk started a topic Php Scripting : Mysql Time format and PHP Calc based on opening hours in databasein PHPPhp Scripting : Mysql Time format and PHP Calc based on opening hours in database
Hi people,
I'm working on a project where I have a MYSQL database containing a database table which has opening hours of a load of businesses in it.
Each business has 4 TIME fields for each day in the format 00:00:00 which are named to indicate the weekday i.e MONOPEN1, MONCLOSE1, MONOPEN2, MONCLOSE2, TUEOPEN1....... ..
My original idea was to output it as a table in the format
Monday...
No activity results to display
Show More
Leave a comment: