-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Displayed... when showing the form? Aren't they already in a ? Displayed when showing the submitted form? You haven't posted the code for that.
-
If you want a read-only file, chmod 0444 for *nix and `attrib +r $file` on Windows.
-
Can I data scrape / datamine data using PHP?
requinix replied to loren646's topic in PHP Coding Help
Generally. What site and what are you grabbing? -
You're not actually outputting a Word doc. That's the only way you could get a read-only restriction.
-
Disabled inputs are not submitted with forms.
-
Change your links to use the URLs you want. Do that manually. Won't happen automatically. Then you can RewriteEngine on RewriteRule ^/?(\d+)$ abc.php?id=$1 [L]in your .htaccess.
-
Depends on the contents of $message, but I'm going to guess it's just HTML markup in which case the answer is probably no.
-
getChildren() is required as part of the RecursiveIterator interface. If you're using a RecursiveIteratorIterator then you're not supposed to call it directly - that's handled behind the scenes. I don't see a flag to return only directories. Looks like you're on your own. But as you've seen it's only one additional line of code, and there isn't really any way it could happen more efficiently behind the scenes.
-
Preventing the double time booking in Reservation
requinix replied to fsaylo's topic in PHP Coding Help
There's also an extra ( there that would break the entire script. -
Preventing the double time booking in Reservation
requinix replied to fsaylo's topic in PHP Coding Help
"SELECT COUNT * FROM reservation WHERE type='$type' AND start_time>=('$start_time') AND end_timeI believe last time I had to think about this the answer was "SELECT COUNT * FROM reservation WHERE type='$type' AND end_time>('$start_time') AND start_timeThat will not consider two reservations as overlapping if they start or stop on the same boundary (ie, one ends at the same time another begins). Use >= and -
Use return values just like you would any other function. private function sql() { return Upload::all(); } public function get_index() { dd($this->sql()); // ??? }
-
Did you post the right part of code? I thought you said it was something to do with "businessname" and sending emails.
-
Or just not output anything if $spec=="id".
-
There's something funky with the setup. I'd pester them about this.
-
Did you take a look at the error message in the $e exception?
-
PHP Array or Function showing wrong questions
requinix replied to z-victoria's topic in PHP Coding Help
Looking at your code more I need to correct something: If you use literally what I posted then most of those else blocks will execute all the time. There should be two conditions going on: (1) they were answering the question and (2) they answered yes or no. You need to break the logic down one more step. if ($_SESSION['track'] == 2 && isset($_GET['answer1'])) { if ($_GET['answer1'] == 'Yes') { // Yes } else { // No } }(Still couldn't do it more easily with a switch.) -
PHP Array or Function showing wrong questions
requinix replied to z-victoria's topic in PHP Coding Help
A switch is merely shorthand for a series of if blocks, but you're essentially switching on true vs false and you've ended up with something even more complicated that the equivalent if blocks. Just go with the if. if ($_SESSION['track'] == 2 && isset($_GET['answer1']) && $_GET['answer1'] == 'Yes' /* <- that was the missing part */) { // "Yes" code } else { // "No" code } -
PHP Array or Function showing wrong questions
requinix replied to z-victoria's topic in PHP Coding Help
Without looking too hard, switch($_SESSION['track'] == 2 && isset($_GET['answer1'])) { case 'Yes':That won't work. You're switching on the result of a && expression. A boolean value. Not a string. Both "Yes" and "No" are ==true so the first case will always be executed. -
Copying files from one hard drive to another
requinix replied to The Little Guy's topic in Miscellaneous
http://www.amazon.com/Vantec-CB-ISATAU2-Supports-2-5-Inch-5-25-Inch/dp/B000J01I1G/ref=sr_1_1?ie=UTF8&qid=1367268789&sr=8-1 That's the product he was linking to. This one doesn't have a referral tag. And isn't obfuscated. And doesn't try to add it to your cart immediately. -
If you're already loading it then you can reuse it with no additional memory usage (besides what's required to make the third image).
-
It will take much more memory to load a 2500x2500 image into memory than a 450x400. Like, >30 times more.
-
Can someone please tell me why my edit code aint working...
requinix replied to Tunavis's topic in PHP Coding Help
Because there's something wrong with it. Considering how you didn't give any kind of explanation behind what your code is supposed to do and what it actually does, I think that's a damn good answer. -
Random Width/Height and Random Rotation
requinix replied to ireallylikepie's topic in PHP Coding Help
No, you can't put variables in CSS. Not without running the file as a PHP script. Are you rotating all the images by the same amount? Then I would put the CSS in a in the . But the code you posted has a different amount for each image, in which case I'd say to use inline CSS for each. Blasphemy, I know. -
Random Width/Height and Random Rotation
requinix replied to ireallylikepie's topic in PHP Coding Help
It will be a different amount. The problem is you're trying to put variables inside a single-quoted string. That won't work. Either use double-quotes echo "";or something else entirely. CSS 3 is a very easy way to rotate an image but it requires browsers that support that. Many, perhaps most, do. That an option? Otherwise you'll have to rotate the image yourself (I mean with code, of course)...