fugix
-
Posts
1,483 -
Joined
-
Last visited
Posts posted by fugix
-
-
Try
<html> <body> <?php $hashtocrack = $_GET['crackme']; $file = fopen("dictionary.txt","r"); if(isset($file)){ while($hash = fgets($file)){ $md5check = md5($hash); if($md5check == $hashtocrack){ echo "Hash found! -> ", $hash; exit(1); } } } ?> </body> </html>
-
If you are storing your user data into a database, which it sounds like you are, you can create a field as an int, primary key and auto-increment, and set that as your user id which will be unique
-
Truthfully, when I first came to this forum yes, now no
-
Where in your code do you set your $_SESSION['username']
-
I will elaborate on what abra posted in case you don't understand what he is trying to say. You need to use the correct operator when comparing the $username variable to 'admin'
if ($username == 'admin'){ header("Location: ./admin.php"); } else
-
Use a union. For correct syntax refer here
-
Have you tried a print_r($_SESSION) to see what is stored as a session. Also, where do you actually set your $_SESSION['username']
-
The single quote in your user data is ending your query prematurely. You will need to use mysql_real_escape_string() before inserting the data into your db
Edit: saw your new post, did you just add mysql_real_escape_string or was it there prior?
-
So you are trying to grab the username from either a form or a query string in this line
$username = preg_replace('#[^0-9]#i', '', $_GET['username']);
But it is not correctly grabbing the data? Do I understand you correctly
-
He should first check his php.ini file for the MAX_UPLOAD_FILESIZE and/or POST_MAX_SIZE to check and see what they are set to.
-
Can you use $_SESSION function differently in another page and it will pick up the other registered variable if it has not been used before.
$_SESSION is a predefined superglobal array, not a function. Also, I don't quite understand what it is that you are trying to ask here. Please be more clear with your question
-
Do you have error reporting set to show all errors.
error_reporting(-1)
And display errors on
ini_set('display_errors','On');
-
There's a hell of an echo in here.
Yeah. No need to repeat something that's already been said. OP, if you need further assistance with this let us know and we will be glad to help
-
Have you tried debugging your query quickly?
$result = mysql_query($sql) or die(mysql_error());
-
Perhaps if you post a bigger chunk of code surrounding the error we can be of more assistance
-
With mysql_fetch_array() you can either use the row integer value, or the associative value. Soulessj, since I see that this problem still has not been solved for you, I will jump in on this one. Can you briefly describe what exactly is going wrong for you now so that I may help
-
Okay I see your issue, you are telling your regex to remember two strings instead of just the one. Try this.
$reg_exCity = '/^Locations: (\w+\s?\w+)$/i';
-
$arr['visible'] = 1;
where $arr is the name of the variable that you store your array in.
-
Instead of using another preg_match() etc to try and compare your email value to your text file, why not use the function in_array() which compares the value of mixed types of data to a value in an array.
if (in_array($cities[1], $citiesArray) {
echo "this one!";
}
else {
echo "not this one";
}
-
.... Welcome to the forums
-
Your syntax is wrong, you are trying to specify an alias in the wrong place. Look here for correct syntax
-
Firstly, set unique names for each input, and adjust your code accordingly. Then repost your code
-
You'll want to use the sha1() function before insertion into your database. Since sha1 is 160, and depending on how many bits pwr character, would effect the length of the value, 20 or 40. So I recommend using BINARY(20) and the UNHEX function to convert the SHA1 value to binary.
-
Okay we are going to expand on the reg exp to eliminate the possibility of grabbing CSS.
$image_object = preg_match_all('/src="(.*?)"/', $description, $matches); $image = str_replace( '"','',$matches[0][0]);
plz help how do i create my own functions??
in Miscellaneous
Posted
I suggest you look here