-
Posts
840 -
Joined
-
Last visited
-
Days Won
1
Posts posted by gristoi
-
-
$result = mysql_query("INSERT INTO `challenge` ( `challenge_game_length`, `challenger_team_id`, `opponent_team_id`, `challenge_due_timestamp_gmt`) VALUES ( 20, '{$c1}', '{$c2}', NOW());");
-
you could use inheritance and have a base db model that all other models extend off
-
$usersEmailAddress = test@test.com; $usersPassword = '123456'; $salt = 'wibbleotter'; // this is secret to you. $token = md5($usersEmailAddress.$usersPassword.$salt); $query = "INSERT INTO User_table .... "; // insert your users details and the token. $url = "http://mysite.com/confirm.php?q=$token"; // email the above to the user and when they cliick on it to log in check with a query like this $query = "SELECT id FROM User_table where username =$username AND password = $password AND token = $token";
hope that help explain it a bit better
-
sorry, im afraid i might not have explained properly. the email will contain a link with the hash in it|:
example:
thank you for registering with............
please click on the link below to confirm your registration:
http://somesitesomewhere.com/confirm.php?q=2df352fd23fd62fd72fd72fd72ff387d736251fdeez
where q is the md5 of their name and email address.
this hash will be unque to their account. you done md5 the email at all
-
my suggestion is:
- user enters username / password and email address into form.
- data gets saved into user table, along with an md5 hash of the username, email and a salt word
- the user is emailed a link with the md5hash as a variable in the link
- this redirects the user to the login page, with a couple of flags to show they are confirming,
- when they hi t submit you check the md5 matches the one in the db and activate the account
- user enters username / password and email address into form.
-
try zend server community edition. i use it all the time and have no issues
-
Site looking great. As spiderwell said the ability to jump to the replies was very handy, also being able to sort the posts by amount of replies would be handy to have back again
-
function checkWord($word) { $firstLetter = substr($word,0,1); $requiredLetters = array('E','L','B'); if(!in_array($firstLetter, $requiredLetters)){ return false; } return true; }
hope that helps
-
change the charset to:
charset=windows-1255
-
data:{ data1 :$('#data1').val(), data2 :$('#data2').val(), data3 :$('#data3').val(), data4 :$('#data4').val(), },
-
You could take a look at Object Relational Mapping. A good example is the Doctrine project http://www.doctrine-project.org/
-
If you want someone to do the work for you then you need to post this in the freelancers section.
-
$post = filter_var_array($_POST,FILTER_SANITIZE_STRING);
that should do it
-
seeign as your php script is stored on the server, if someone has the ability the alter your script then this is the least of your worries.
-
your problem is due to the fact that the posted data is actually a string. so even though you have put in something like 2.55 it will actually be '2.55' which is a string. you can check it is numeric using
is_numeric()
. you can also check using a regular expression. Or type cast the value into a float :
(float)$_POST['prod_price']
-
if ((isset($_POST['submit'])) and ((int)$_POST["ValAnswer"] == 75))
-
do you have any example code of what you have tried so far?
-
where is
$currentpage
defined?
-
like i said in my previous comment, you are not posting username over to the changepasswordDb. you have two hidden fields with the name set to grade, not username and password. so you are in effect telling the query to
$query="UPDATE administrator SET password='$newpassword' where username=''";
so it will never update. change the input names from grade to username and password accordingly
-
have you even tried to debug this, you dont even have an input field to enter the new password into ???
-
why not just use jquery?
$('#id_of_element').fadeOut(); etc
-
you not checking if newname actually exists, so you are just overwriting with a blank value. try adding this into the final loop of your code
if(isset($_POST['update_showcase_image']) && !$errors && $newname)
-
have a google on using ajax to make a call to a database
-
answer to what? . you havent explained what the problem is or what you have tried already to resolve the problem?
Grab Images Form Subfolders
in PHP Coding Help
Posted · Edited by gristoi
you could use the directory iterator class (part of php5+):