Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > PHP

Reply
 
LinkBack Thread Tools Display Modes
Old 06-17-2005, 05:26 PM   #31 (permalink)
BUFFY
Registered User
 
Join Date: May 2005
Posts: 29
BUFFY is on a distinguished road
Like to thank everyone for their help.

I now have a working login script and registration!

However, im using:
$username = mysql_real_escape_string($username);
and
$title=mysql_real_escape_string($_POST['title']);

but need the PHP3.43 equivalent...

Any ideas?

Last edited by BUFFY; 06-17-2005 at 05:51 PM.
BUFFY is offline   Reply With Quote
Old 06-17-2005, 05:44 PM   #32 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 651
DJMaze is on a distinguished road
mysql_escape_string($username);

but that's for non-binary data only
DJMaze is offline   Reply With Quote
Old 06-17-2005, 05:53 PM   #33 (permalink)
BUFFY
Registered User
 
Join Date: May 2005
Posts: 29
BUFFY is on a distinguished road
mysql_escape_string

Non binary - as in non numbers? or non true/false??

I need it for dates and phone numbers, would it be suitable?
BUFFY is offline   Reply With Quote
Old 06-18-2005, 01:45 PM   #34 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 651
DJMaze is on a distinguished road
A phonenumber is text, a date is numeric/text, both are non-binary

Binary data is images, unicode, zip, exe, etc.
If you want to store such items in your database the mysql_escape_string() can't deal with them properly.
The exact reason is also depending on character set and other aspects
read for more details: http://php.net/mysql_escape_string
DJMaze is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with PHP Login Script JimAdkins PHP 14 03-19-2005 02:40 PM
Executing a server script from PHP sde PHP 4 02-05-2005 11:12 AM
online bank login not secure sde Lounge 2 12-06-2004 03:08 PM
login script trevor PHP 21 01-17-2003 06:28 AM


All times are GMT -8. The time now is 11:51 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting