wouldn't mind finding something like that myself!
But don't use MD5, its been cracked by now...use
hash('sha512', $data);
or at least
hash('sha256', $data);
(you can find the different hashing engines you can replace sha512/256 with by looking at the output from phpinfo(); )
User Profile
Collapse
-
yip! that made it work! thank you sooo much! That was driving me nuts!
So apparently you can't have a function with the same name as an element in your form...who knew!Leave a comment:
-
Page wont work when I add form tags!
Hey.
I was trying to write a page yesterday where an admin can register a user. I wrote some javascript so that when the forename or surnames are off focus, a script is run to take the forename and surname, concatenate them and put them in the username box as a suggestion. The code worked fine until later when I added the form tags around the inputs (forgot to do it earlier). Code below:
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD
-
there is no decrypt function, its a one way process. otherwise if anyone got into your database they could just decrypt all the credit card numbers, infact any two way hashing and unhashing will be like this.
If you need to store them in a retrievable way that is a bit encoded, use rotate13 or base64 encoding, that can be undone otherwise just use plain text.
Hashes are irreversibleLeave a comment:
-
-
ok, so your reading all the data into an array from a text file (not a good way to do it, databases are sooo much easier but each to their own)
your best bet is a multidimensiona l array so read in one line at a time and upon reading it in, pass it through the function preg_split()
there are two ways to sort your data, read in the entire file and split per line and then per item of read in line by line and split the data,...Leave a comment:
-
Unfortunately i'm not going to be terribly helpful, but I understand where your coming from, I was the same the first time I seen it! (still never use it, not yet anyway!) but your best bet (if your into such things) is to get a book or two (O'Reilly are good for these things!)
Personally, i'm a learn it as I need it person so google is my friend! And probably yours if your looking for a quick tutorial to see what its about and basically...Leave a comment:
-
unset() unsets more than it should from $_SESSION subarray
hey, i'm basically trying to use php sessions and a bit of javascript to make tabbed browsing within a web page using sessions to store the data of the different opened pages.
Problem: when i unset the first 0 index in the array (ie close the default page) it seems to wipe the other one (can't get it to add more that one anymore) from the array also
the information is held in sub array
[PHP]$_SESSION['pages'][/PHP]... -
Yea, that would look to be what I want to do, thanks!
will put some code up anyway so you can see what im at, but need to write a bit more to actually make it work!
(and the php sessions decided they didn't want to work on my computer after a reboot, so will have to get that sorted before writing and testing further)Leave a comment:
-
If you know any php, you could use the GD library and a wee bit of php to create an image dynamically? or even just create an image of text in photoshop or whatever?! or if you want to learn do what he said ^ up there!Leave a comment:
-
Change page in other frame on load from variables?
Hey all, Im trying to create a thing that will essentially allow me to use tabbed browsing within a website using php sessions to store the different opened pages.
To do this, im using two frames, 'id'ed menu and main
The menu is to hold the main code for listing the open tabs and creating new ones.
My question, can i use a javascript onload function to load a page into the 'main' frame from the menu.php page... -
i'm not entirely up to speed on how sessions work yet myself but i would assume something like this:
instead of having to send the information through the url as you are doing, keep it stored on the server in a session. put the variables $id and $name in the session like so ( i think! ):
$_SESSION['id'] = their id;
$_SESSION['name'] = their name;
then when you go the the form handling page you can access...Leave a comment:
-
Mac OS X 10.4
Python 2.5
IDLE and TextWrangler (freeware version of BBedit, VERY good) on occasionLeave a comment:
-
the easiest way is to have a field, i just call it ID, and auto increment it and then you can either run a little while loop that reads out the ID field until it finds the bigest value although thinking about it that might not work, id have to think about that. but i will asume there is an sql function that will tell you how many records there are in a table so you then simply use that value and go
[PHP]
$resource = mysql_query('SE LECT...Leave a comment:
-
you could simply try
<?PHP
include("path/to/file.swf");
?>
but you would have to make sure its originally the size you want it to be displayed as and put it in a <div> tags or whatever to place it on your page as there wont be any options like you would have in html like width, height position etcLeave a comment:
-
two things,
1: does your page have anything else on it apart from the php code, ie, is there any html in your page as well and
2: make sure your <?PHP tag is at the very begining of the file, ie no white space above it and not spaced or tabbed in.
these are problems i've had in the past and learnet fromLeave a comment:
-
java -classpath problems
i have to learn java for college and im trying to do a programming assignment at home. in class we use a class file called InOut which simplifys input and output but i can't get the compiler to see the classfile this is the compiler output:
(the file InOut.class in in /jclass)
me@mycomputer:~/docs/programming/JAVA$ javac -verbose -classpath /jclass iotest.java
[parsing iotest.java - #1/1]
[reading java/lang/Object.class]...
No activity results to display
Show More
Leave a comment: