4,098
Loading...
Uploader Comments (phpacademy)
see all
All Comments (21)
-
whoa did not know you can do isset for multiple variables and separate with commas. In your beginner tutorials on thenewboston, you typed isset for each one. Good thing I saw this video, saves lots of typing.
Also good idea on that indentation. Looks much cleaner.
-
@EmilsMC That's Cheating! Haha!
-
I'd just add an @ before the variable :)
-
You are an absolute don!!!
-
I found other solution, copy and paste this code to your scripts.
error_reporting (E_ALL ^ E_NOTICE);
-
Thank you a lot.
I have googled a lot and posted on forums but nothing had worked out even from the book itself [thaugh not finished up reading].
Using the tips you gave it helped a lot.
-
@phpacademy Thank you very much, never knew that!
Loading...
hi there you don't have to add a hidden field and check for it you could just
give the submit button a name like this:
input type="submit" value="Submit" name="submit"
and then check if the submit button is clicked like this:
if (issset($_POST['subbmit']){
tyoil 5 months ago
@tyoil That's true. It's personal preference really. I just feel it's cleaner to specify a hidden value.
phpacademy 5 months ago
another way that wasn't mentioned here is to just mark a '@' before the dollar sign, which will remove the error. For example:
if ($_POST['something']) becomes if (@$_POST['something'])
strafir 5 months ago
@strafir No! Never do this. It will decrease script performance (load time).
phpacademy 5 months ago
since when can you do commas instead of dots for concatenating?
winfr34k 5 months ago 2
@winfr34k The echo construct is loosely regarded as a function, which can take an unlimited amount of parameters. Hence, each string can be separated by a comma.
phpacademy 5 months ago 5