
trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
I would remove all of your code and use password_hash as it was intended.
-
Older than 5.4? Really? 5.3 has reached end of life. People need to get better hosting if that's the case.
-
Short echo tags have been enabled by default since 5.4 and there is no longer any means to disable them. Oh, and hi deathbeam. Welcome.
-
This example should get you started: http://forums.phpfreaks.com/topic/11578-force-downloads/
- 1 reply
-
- 1
-
-
Any data in your system relating to this user needs to be stored along with an id that identifies it as belonging to this user. Then, your simply filter any queries by that users id.
-
So why are you trying to use it? All of the above code needs to be thrown away.
-
One problem is, none of the values you are passing along with your post are being set. $.post( "send.php", { zProduct: zProduct, zBay: zBay, zMeasures: zMeasures, zDoor: zDoor, zPlinth: zPlinth, zMount: zMount, zBattery: zBattery} ); Where is zProduct, zMeasures, zDoor etc etc being set? Another issue, you have that same line wrapped in php tags. It's not php.
-
Following Simple CMS Tutorial -- page loads blank
trq replied to mikeytrieb's topic in PHP Coding Help
Sorry, but that code is terribly dated and isn't really a good example to begin with. Why learning php from a css site seemed like a good idea I'm not sure. Anyway, its seems you have display_errors switched of and maybe have error_reporting set too low. Check your php.ini which is well commented, and fix. -
PHP Classes - Tricks for loading classes within classes
trq replied to CrimpJiggler's topic in PHP Coding Help
No, the opposite. When classB extends classA you say that classB is a subclass of classA. If classA contains an instance of classB, classA has a classB. That would never make sense. A Device is not a Config. You only extend one class with another of the same Type. -
You probably want to look at generators for the most efficient way to loop through a files contents. <?php function getLinesFromFile($file) { $f = fopen($file, 'r'); if ($f) { while ($line = fgets($f)) { yield $line; } fclose($f); } } foreach (getLinesFromFile("yourlog.txt") as $line) { // do something with $line } This will only every load into memory a single line at a time.
-
its not a competition. Nor is there such a thing as the "best" framework. Both Laravel and Symfony are nice, modern frameworks. Laravel is easy to learn and growing quickly and Symfony is just as solid as ever. Either of those two would be beneficial to learn.
-
Code Ignitor is a dying framework that was poorly designed and terribly implemented in the first place. Don't waste your time. Find a modern framework to learn.
-
How to send SMS to form submitter using my own API in JotForm?
trq replied to Mariabbbb's topic in PHP Coding Help
We are not here to write code for people. If you have a specific question, ask it. If your looking for a programmer, hire one. -
You can connect to access databases using the ODBC driver. See: http://php.net/manual/en/book.uodbc.php
-
How to send SMS to form submitter using my own API in JotForm?
trq replied to Mariabbbb's topic in PHP Coding Help
Do you have a question? -
Or have produced a fatal error.
-
Start by posting some code. Using multiple objects of the same type in the same scope does not alone cause any issue.
-
Why isnt isset working? Whats wrong with this?
trq replied to xFalseProphet's topic in PHP Coding Help
Yes, you would fix that by checking the index exists (using isset) within the array before accessing it. -
PHP's only concatenation operator is a period, end of story. What you are mistaking for concatenation with echo and print are actually arguments. Function (or in this case language construct) arguments are separated by comma. Because echo and print are "language constructs" they do not need () brackets around their arguments either. If you look at the man page for echo, you see that it simply "Outputs all parameters". Hence, it kind of acts/looks like concatenation, but its not.