Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
BTW the plural of child is children
-
No, DELETE is for an entire row. To change the title of the post you would use UPDATE.
-
Mysql num_rows shows 3 results, fetch array outputs only 2.
Jessica replied to Ivan Ivković's topic in PHP Coding Help
That doesn't make sense. Can you post the code for fetch_array()? Is this a function you wrote or are you using a DB class? -
Mysql num_rows shows 3 results, fetch array outputs only 2.
Jessica replied to Ivan Ivković's topic in PHP Coding Help
What happens if you replace echo $pics -> num_rows; while($fetch = $pics -> fetch_array()){ With a for loop? for(i=0; $i<$pics -> num_rows; $i++){ $fetch = $pics -> fetch_array(); .... -
Difficulties with simple IP ban reader from file
Jessica replied to sphinx's topic in PHP Coding Help
if (($i = array_search($ip, $deny_ips)) !== FALSE){ array_search returns a key or false. You then assign it to $i - the ACT of assigning it to $i will ALWAYS be true. So it will NEVER !== FALSE. -
No, it shows you exactly what it looks like as "Source". It's not vote=pmc, it's action=vote and id=pmc and a bunch of others.
-
You can use PHP to generate the CSS file by using the header() command. If you're trying to do some dynamic CSS that is what you need. http://www.barelyfitz.com/projects/csscolor/
-
So, there's three things that you need to understand how to use. . is the concatenator. It glues strings together. () pair of parens is a function call (or object creation). IE: $var = new Var(); or $data = doStuffWithData($someData); -> is calling a method from an object. IE $var = new Var(); $var->doStuff(); $this can only be used within the object you're in. An object can contain other objects so you can end up with $this->otherObj->doSomething(); Starting from the beginning: $plainPW = $this->input->post('password'); This line means there is an object called input within this object we're in, and the input object has a method called post. At this point you should have your user's inputted password. You can echo it to make sure you got the right thing. Now you want to compare it to the saved password, so you need to hash it the same way. Find the code in your model which creates the user and takes their original password and hashes it. Can you post that code here?
-
Having a space after your ; will not cause a syntax error. Extra whitespace where you're allowed to have whitespace won't cause issues in PHP. Whitespace can cause issues when you can't have ANY but that is not your problem.
-
header(Location:"http://www.blu-byte.co.cc/members/profile/edit.php"); This isn't line 10 but it should produce an error too. Change to. header("Location: http://www.blu-byte.co.cc/members/profile/edit.php");
-
HTML Form not inserting to mysql... no errors reported
Jessica replied to Doc20's topic in PHP Coding Help
Well considering you guys spent two pages trying to figure out how to access the first element in an array, I thought it should be mentioned. -
HTML Form not inserting to mysql... no errors reported
Jessica replied to Doc20's topic in PHP Coding Help
It's not a o it's a 0. The BBcode turns a 0 between two [ and ] into a bullet. -
Debugging, based on this board... :-P
-
What did you read to come to that conclusion?
-
If I understand you correctly, you would use ajax.
-
HTML Form not inserting to mysql... no errors reported
Jessica replied to Doc20's topic in PHP Coding Help
For one, your table doesn't have the column c_name so it should fail there. Secondly age is an int and you're inserting a string. '21' != 21 when it comes to SQL. Same for the other ints. Copy and paste that query directly into phpMyAdmin. Does it give you an error now? -
Multiple pages - calling a script function from another page
Jessica replied to aubake01's topic in PHP Coding Help
No, he wants the JS files hosted somewhere else. Why, I don't know. But he wants the .js on a public server like google API does with jquery. -
HTML Form not inserting to mysql... no errors reported
Jessica replied to Doc20's topic in PHP Coding Help
It shouldn't be. The random number is limited to 6 characters. Is the max INT not 2147483647 (10 characters)? I can't tell from your screenshot which it is, but one of the columns is much larger than 6. Since you said it randomly stopped working, my first guess is a column is at it's maximum. It's clearly not the one that's 6 tho -
HTML Form not inserting to mysql... no errors reported
Jessica replied to Doc20's topic in PHP Coding Help
In your original code, replace this line $app_application = mysql_query("INSERT INTO applications (id, site_id, timestamp, name, c_name, username, steam, xfire, email, games, why_join, age, location, microphone, recruit_style, clan_history, recruit, ip) VALUES('$application_id', '$site_id', '$timestamp', '$_POST[name]', '$_POST[i_name]', '$_POST[username]', '$_POST[steam]', '$_POST[xfire]', '$_POST[email]', '$_POST[games]', '$_POST[why_join]', '$_POST[age]', '$_POST[location]', '$_POST[microphone]', '$_POST[recruit_style]', '$_POST[clan_history]', '$_POST[recruit]', '$_POST[userIP]') ", $recruit_link) or die(mysql_error()); With this $sql = "INSERT INTO applications (id, site_id, timestamp, name, c_name, username, steam, xfire, email, games, why_join, age, location, microphone, recruit_style, clan_history, recruit, ip) VALUES('$application_id', '$site_id', '$timestamp', '$_POST[name]', '$_POST[i_name]', '$_POST[username]', '$_POST[steam]', '$_POST[xfire]', '$_POST[email]', '$_POST[games]', '$_POST[why_join]', '$_POST[age]', '$_POST[location]', '$_POST[microphone]', '$_POST[recruit_style]', '$_POST[clan_history]', '$_POST[recruit]', '$_POST[userIP]') "; echo $sql; die(); What gets output? -
HTML Form not inserting to mysql... no errors reported
Jessica replied to Doc20's topic in PHP Coding Help
Also you're saying you don't get an error from the or die(mysql_error()) part, but the query doesn't execute? Do you have error reporting turned on and error logging off for dev?