AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
Display Records By Newly Added Or Updated How?
AyKay47 replied to lovephp's topic in PHP Coding Help
Yes, there is.. In this particular case I would recommend using it, since it carries nice automatic initialization and update properties with it. To add these properties to a TIMESTAMP data type field, you will need to add the CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP attributes to the field's definition. -
Display Records By Newly Added Or Updated How?
AyKay47 replied to lovephp's topic in PHP Coding Help
`holdyourhand` DATETIME NOT NULL -
Your use of the exit statement here is incorrect. You should be using the correct if { }else { } conditional instead: if ($productMatch > 0) { 'true block' }else{ 'false block' } Also, check to make sure the file was actually uploaded before using header(); if(move_uploaded_file( $_FILES['fileField1']['tmp_name'], "../inventory_images/$img1")) { header("location: inventory_list.php"); }else { 'error handler' }
-
That is a hosting provider issue and you will need to contact them.
-
Display Records By Newly Added Or Updated How?
AyKay47 replied to lovephp's topic in PHP Coding Help
Jesi asked for your table structure, which would help us solve your problem. You will need to supply that information before we can really help you. If you have a unique column that is auto_increment, you can order the results by that column descending. As to why you are seeing a blank page, in your query you are not descending by a column and you are misusing the * asterisk symbol, therefore the SQL syntax is invalid and an error is being triggered. You should have error_handling set to -1 and display_errors set to on. -
A suggestion to the above code would be to strengthen the regex filter a little. As is, a file named jpg.exe would pass the filter. Something such as: preg_match('/^[a-z0-9]+\.(jpg|gif|png)$/i', $entry) should be fine for what you are using it for.
-
Hello everyone! It has been some time since I have been to phpfreaks. Now that the wedding is over and everything is back to normal, I hope to continue being an active member in this community. I would like to take this time to state that I'm diggin' the new site look, so whomever took part in the design of it, well done!
-
post the entire rewrite, including any conditions and the engine start.
-
I know that , but when i call the logout function and then call the check login, it still returns true. you did not state this at all in your OP.
-
it returns true because the Login() function sets $_SESSION["loggedin"] to true when called.
-
Yes you can do that, it all wraps around regular expressions.
-
I wasn't trying to knock you down, everyone makes mistakes. But you must ask yourself if the answer will help or hurt the person asking. Sometimes it is better to not say anything at all.
-
no, the actual rewrite was correct the first time, you just stated what it would do incorrectly. Please do not post responses unless you are sure of what you are talking about. It can be more detrimental then helpful. OP, there are many resources on the subject, you will want to google "mod_rewrite" or "rewrite rule" and you will get an idea of how to go about this.
-
the undefined index error could be triggered by either $_POST or $_SESSION, give us the exact line. $userid does not exist inside of the functions scope, you must pass it in through the argument list in order to use it in the function.
-
Fatal error: Class 'msqli' not found
AyKay47 replied to mike_abc's topic in PHP Installation and Configuration
then extension = "mysqli.so" -
strip only certain tags, remove body tags, but keep its content.
AyKay47 replied to louis_coetzee's topic in PHP Coding Help
strip_tags allows a second argument with a list of allowable tags, all other tags not listed in the second argument will be stripped. -
Fatal error: Class 'msqli' not found
AyKay47 replied to mike_abc's topic in PHP Installation and Configuration
1. make sure the socket exists. 2. inside of the php.ini, make sure that the directive extension=php_mysqli.dll is enabled. I believe it is disabled by default. -
Since these are in one form, I recommend either having the inputs in array format or assigning them unique names, unless the user is only allowed to fill out 1. eg option 1: <input name="option1" type="text"> Price: <input name="price1" type="text"><br><br> option 2: <input name="option2" type="text"> Price: <input name="price2" type="text"><br><br> option 3: <input name="option3" type="text"> Price: <input name="price3" type="text"><br><br> option 4: <input name="option4" type="text"> Price: <input name="price4" type="text"><br><br> option 5: <input name="option5" type="text"> Price: <input name="price5" type="text"><br> But as to your mysql question, you want to display the data that the user input from the database? Can you give us a layout of the db please.
-
Fatal error: Class 'msqli' not found
AyKay47 replied to mike_abc's topic in PHP Installation and Configuration
1. make sure the relevant socket was created successfully. 2. make sure the proper directive is enabled for the mysqli lib in the php.ini -
Can you give an example, do you have any code started?
-
yes it's possible. You could use .htaccess to rewrite the URL so when someone accesses for example www.example.com/AyKay47 the server will actually serve them www.example.com/index.php?username=aykay47 and handle the query string accordingly to serve the correct data in correlation to that user.
-
I can't even decipher the logic behind your code, it's a mess. 1. you should be joining queries together instead of querying inside of a while loop, this will save resources and cut down on server load times. Please explain in English exactly what you are trying to do so we can assist you further.
-
You already have a thread started for this issue, where Requinix and myself helped you. If you do not understand our suggestions, post your questions there.
-
the freelance section is there to either find work or to find someone to do the work for you.