DONT READ THIS! TOMORROW WILL BE THE BEST DAY OF YOUR LIFE AND YOU WILL GET A KISS FROM THE LOVE OF YOUR LIFE. BUT IF YOU DONT POST THIS ON 10 VIDEOS IN 2 HOURS YOU WILL DIE IN 2 DAYS. NOW THAT YOUR READING THIS DONT STOP! AFTER YOU POST THIS ON 10 VIDEOS PRESS F6 AND YOU CRUSHES NAME WILL APPPEAR ON THE SCREEN. ITS FREAKY CAUSE ITS TRUE
can u put ur .php in the description so that we, as newbies here can follow of what u're putting starting from part 1? i just want to see the codes that u added. :( thanks :)
@XxRedDude can someone explain why this is so? doesnt help much to just put it in without explanation even though it does work after putting in the @ symbol. any help would be much appreciated
@kobi1974 If you have trouble with errors in PHP, you can add an at sign before an called function, or like in the example, before a variable. It will suppress the warnings that normally come up when there is one.
@charmanderstail Im sitting here thinking the same thing, first thing i thought of when i saw this was to type in md5 reverse and sure enough first link , works every time. They really should improve this by switching to a system with 10 dif types of encryption or more and having it use one of them at random or something along those lines . anything is better than this ridiculous bs
@FFWDEntertainment Yeah but even if you did get hacked and the hackers got the encrypted passwords somehow, I suppose they might not know it's md5... but they could probably just try out every type of encryption they know of.
@charmanderstail are you shitting me? do you really believe someone who doesn't know how to hack into a database doeskin know the basics of working with php & mysql? if anything I think coming up with your own encryption script and putting it on a seperate server/ labeling the pw field something random and unexpected like user_avatars and just adding a .jpg extension on the end would throw someone off better than this.
to @bikenb1 or themightyrobofish who ever posted the code if isset and to put all of the stuff in the if statement thank you very much i have no index errors during his echo statement and to all of who wants the code with no errors heres the code
@csyicker Is this true? I've found plenty of so called MD5 Cracks, but I can't find a way to crack the md5 versions of my passwords in the DB. Doesn't Crypt() also mean your encrypted value in the database is tied to that single server. If so good luck migrating your DB to another server.
I am getting error when I am using the below code $submit= strip_tags(& $_POST['submit']); $fullname=strip_tags(& $_POST['fullname']); $username=strip_tags(&$_POST['username']); $password=md5(strip_tags(&$_POST['password'])); $repeatpassword=md5(strip_tags(&$_POST['repeatpassword'])); so someone please help me below is the error Deprecated: Call-time pass-by-reference has been deprecated in C:\xampp\htdocs\register.php on line 14 and so on till line18
the solution i used is get all the variables inside the first if and change the condition for "isset($_POST['submit'])" and put an else whit $fullname =""; $username=""; like this:
Guys.. This is self explainable. If you have errors, look at your script again. No need to post in comments, because all PHP errors are minor.. including the ones above. Sorry about being rude, but for someone like me who's seriously experienced in PHP it makes me cringe that people don't even know this much yet. :-/
@Acceptable76 Please take a look at the video you're commenting on before saying stupid things. This is a tutorial which is obviously meant for people to LEARN. If we all would be experts like you're assuming, we wouldn't be watching this video!
You're getting the "Undefined index" error because the $_POST values you are trying to reference in the php code are not set until the form has been submitted. The best way around this is to add an if statement at the beginning of your php code which uses 'isset' to verify these values exist before trying to manipulate them.
The code you need to add is:
if( isset($_POST['submit']) && $_POST['submit']){
// This code will only run if $_POST['submit'] is set.
@bikenb1 It does work, but you need to put ALL of your php code inside of the if statement I gave you originally. Remembering that the post data 'submit' that the if statement is checking for are those set in your html form which are passed through the $_POST function. Its really not hard.
I keep getting an "undefined index" error message, but when I submit the form when it's all empty it goes away. I think it needs a default value or something could you please help?
I also got an error when doing the strip_tags. What is did is like this; //form data $fullname = &$_POST['fullname']; $username = &$_POST['username']; $password = &$_POST['password']; $rpassword = &$_POST['rpassword']; //striping $fname = strip_tags("$fullname"); $uname = strip_tags("$username"); //hashing $pw = md5 (strip_tags("$password")); $rpw = md5 (strip_tags("$rpassword")); I don't know if i used the correct syntax for the double quoted variables. Please correct my codes if wrong
I got this error "Deprecated: Call-time pass-by-reference has been deprecated in C:\xampp\htdocs\register.php on line 8" when i tried to put md5 on &$_POST['password'] and &$_POST['rpword'] but i fixed it by declaring $password and $rpassword as md5.
Thank you iTwistar that worked perfectly. The warnings are gone and everything works the way I want them too as soon as I publish my site I will leave a link in the comment area of the last tutorial in this series which is Email activation(part5) . Now my thanks to phpacademy for theses tutorials I never touched or really looked at PHP or HTML before a week ago. Thank again and keep them coming. Very good tutorials easy to understand and learn from.
and the rest of the &$_POST work for a minute and then when you start to do
$fullname = strip_tags(&$_POST['fullname']);
gives a Deprecated: Call-time pass-by-reference has been deprecated in C:\xampp\htdocs\register.php on line 9
I have gone all the way through to the Changing password tutorials and every thing works but just need to get rid of the Warnings any thoughts on that.
i wonder, could you please please please make a video on why this might be happening? i cant think of anything that could be causing it for us and not you :(
@Guitaremalte These are only "Notices" they do not terminate the rest of the code like regular Errors do... from now on what you should do is add an @ symbol in front of all of the $_POST variables to tell the code to ignore notices thrown by the $_POST variable. hope i explained this properly... the answer to your question lies here:
@TheHumanBanana but this returns undefine when i put username pass and press register it returns undefine in all fields like this undefine/undefine/undefine/undefine
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'localhost' (using password: YES) in C:\adress\registerDOTphp on line 12
ya even i am having problem with $_POST['submit']; it doesn't show any error but it's not doing anything either... i tried without it ant it works. could you explain the use/importance of it and reason why it's not working on mine. I am using xampp.
Guys if you get a undefined index error, just use a ternary operator, it doesn't hide the error:
$submit = isset($_post['submit']) ? $_post['submit'] : '';
//form data
$fullname = isset($_post['fullname']) ? $_post['fullname'] : '';
$username = isset($_post['username']) ? $_post['username'] : '';
$password = isset($_post['password']) ? $_post['password'] : '';
$repeatpassword = isset($_post['repeatpassword']) ? $_post['repeatpassword'] : '';
Peppaaah 1 day ago 2
This has been flagged as spam show
DONT READ THIS! TOMORROW WILL BE THE BEST DAY OF YOUR LIFE AND YOU WILL GET A KISS FROM THE LOVE OF YOUR LIFE. BUT IF YOU DONT POST THIS ON 10 VIDEOS IN 2 HOURS YOU WILL DIE IN 2 DAYS. NOW THAT YOUR READING THIS DONT STOP! AFTER YOU POST THIS ON 10 VIDEOS PRESS F6 AND YOU CRUSHES NAME WILL APPPEAR ON THE SCREEN. ITS FREAKY CAUSE ITS TRUE
haghebaert 3 days ago
md5decrypt(dot)org
allfreetutorials0 1 week ago in playlist Register & Login
ok, so i added the @ before _POST['submit']; so the error messages went away, but it doesn't want to echo out whatever i input. any ideas?
UrsusBorealis 1 month ago in playlist Register & Login
can u put ur .php in the description so that we, as newbies here can follow of what u're putting starting from part 1? i just want to see the codes that u added. :( thanks :)
eldes23 1 month ago
God bless you man! Your tutorials have been extremely...thanks and God bless!!
limanjnr03 1 month ago
Fatal error: Can't use function return value in write context in C:\xampp\htdocs\bautista\login.php on line 20
my line 20 is if ($username == $dbusername&&md5($password) = $dbpassword)
why does it says fatal error
lenoj02 1 month ago
@lenoj02 remove one of the = signs
pabl0182 1 month ago
Guys if you get a undefined index error, just add a @ at the begining of all $_POST in your register.php. For example:
$submit = @$_POST['submit'];
//form data
$fullname = @$_POST['fullname'];
$username = @$_POST['username'];
$password = @$_POST['password'];
$repeatpassword = @$_POST['repeatpassword'];
if ($submit)
it worked for me
XxRedDude 2 months ago 5
Comment removed
PktMma 1 month ago in playlist Register & Login
@XxRedDude can someone explain why this is so? doesnt help much to just put it in without explanation even though it does work after putting in the @ symbol. any help would be much appreciated
armansrsa 1 month ago
@XxRedDude Thanks for the tip.But what does the @ do for us?
kobi1974 1 month ago
@kobi1974 If you have trouble with errors in PHP, you can add an at sign before an called function, or like in the example, before a variable. It will suppress the warnings that normally come up when there is one.
MrYoranimo 3 weeks ago
@MrYoranimo Thank you again.
kobi1974 1 week ago
@XxRedDude Putting @ in front of the posts won't stop the actual error it will just hide the error message.
DETROITEDOGG000 1 day ago
IMO, MD5 is obsolete. i personally use SHA256 for now (longer character length, but more secure), ie. at least until SHA-3 is released. :)
TheMrSly 2 months ago
@TheMrSly can you write sha256 the same way he is writing md5? Doesn't seem to work for me.
PktMma 1 month ago
plzzzz help me i get this error Call to undefined function mysql_connect()...
bmxtricky5 2 months ago
6:50 your MD5, ITS OVER 9000!
bugeb 2 months ago
I don't see how md5 improves security... It can easily be decrypted.
charmanderstail 2 months ago 3
@charmanderstail Im sitting here thinking the same thing, first thing i thought of when i saw this was to type in md5 reverse and sure enough first link , works every time. They really should improve this by switching to a system with 10 dif types of encryption or more and having it use one of them at random or something along those lines . anything is better than this ridiculous bs
FFWDEntertainment 2 months ago in playlist Register & Login
@FFWDEntertainment Yeah but even if you did get hacked and the hackers got the encrypted passwords somehow, I suppose they might not know it's md5... but they could probably just try out every type of encryption they know of.
charmanderstail 2 months ago
@charmanderstail are you shitting me? do you really believe someone who doesn't know how to hack into a database doeskin know the basics of working with php & mysql? if anything I think coming up with your own encryption script and putting it on a seperate server/ labeling the pw field something random and unexpected like user_avatars and just adding a .jpg extension on the end would throw someone off better than this.
FFWDEntertainment 2 months ago
@FFWDEntertainment I know that would be a lot more secure but md5 does provide some security... just not much.
charmanderstail 2 months ago
'@' will not issue a notice if the index $_POST['fullname'] doesn't exist. THATS WHAT IT DOES. :) like.
rainbowcrak 2 months ago 2
Why do you not get same errors as me!
rainbowcrak 2 months ago
Notice: Undefined index: submit in C:\xampp\htdocs\login_registration_nahid\register.php on line 4
Notice: Undefined index: fullname in C:\xampp\htdocs\login_registration_nahid\register.php line 7
Notice: Undefined index: username in C:\xampp\htdocs\login_registration_nahid\register.php line 8
Notice: Undefined index: password C:\xampp\htdocs\login_registration_nahid\register.php line 9
when i click register button,nothing happened .anybody can email correct answer:nahidchow@gmail.com
nahid62 3 months ago
to @bikenb1 or themightyrobofish who ever posted the code if isset and to put all of the stuff in the if statement thank you very much i have no index errors during his echo statement and to all of who wants the code with no errors heres the code
if( isset($_POST['submit']) && $_POST['submit']){
// Initialise $_POST variables eg:
$fullname = $_POST['fullname'];
$username = $_POST['username'];
$password = $_POST['password'];
$repeatpassword = $_POST['repeatpassword'];
echo"$username/etc
025JoshTMMM82 3 months ago
Comment removed
TheLoLGameplays7312 3 months ago 2
wootowot
skullcanemaker 4 months ago
Notice: Undefined index: submit in C:\xampp\htdocs\SiteB\Register.php on line 2
Notice: Undefined index: fullname in C:\xampp\htdocs\SiteB\Register.php on line 4
Notice: Undefined index: username in C:\xampp\htdocs\SiteB\Register.php on line 5
Notice: Undefined index: password in C:\xampp\htdocs\SiteB\Register.php on line 6
Notice: Undefined index: repeatpassword in C:\xampp\htdocs\SiteB\Register.php on line 7
tonytrfd 5 months ago 13
@tonytrfd thats the same problem as mine :(
Meekay100 5 months ago
@tonytrfd i got the same error too but once i set the items they went away...i suppose it was b/c the variabled werent being used
Carlitta87 1 week ago in playlist More videos from phpacademy
Awesome tutorial!
I'm from Austria and I nearly understand everything! Thanks!
But I have a problem...
When I click on "submit"
it only appears "$username" and not the chosen username :(
What shall I do?
MoonyGaara 5 months ago
If you get "Undefined Index" error then use this code
if($_SERVER['REQUEST_METHOD'] == "POST")
Use the code for both "form data" and echoing out $username and so on!
I tried the code provided by other comments,they worked without errors but would not echo out what i wanted it to.
thelukenukemshow 5 months ago
If you think we can do this without you providing all of the php/html codes your crazy.
Darr3nDav1s 5 months ago
Comment removed
andtheBeans 5 months ago
Using this
error_reporting(0);
I have made the errors go away, would this effect anything?
r4ym4n333 6 months ago
md5 is easy crackable, this tutorial should stats crypt(string) is better.
csyicker 6 months ago
@csyicker Is this true? I've found plenty of so called MD5 Cracks, but I can't find a way to crack the md5 versions of my passwords in the DB. Doesn't Crypt() also mean your encrypted value in the database is tied to that single server. If so good luck migrating your DB to another server.
DHirschfelt 5 months ago
If $_POST['submit'] is not set, then $submit wont be set either. So you will have to check whether they have been set using the isset function:
if(isset($submit))
{
echo "$username/$password/$repeatpassword/$fullname";
}
avatarraid 6 months ago
@avatarraid still not working :(
crvenatuba 5 months ago
Comment removed
avatarraid 6 months ago
Comment removed
avatarraid 6 months ago
Comment removed
avatarraid 6 months ago
Comment removed
avatarraid 6 months ago
I have the exact thing as you and still not getting rid of the undefined index: error wats wrong wit
if($submit)???
keeezz 6 months ago in playlist Register & Login
still getting some errors:
Notice: Undefined index: submit in B:\xampp\htdocs\keysmasters\loginsession\register.php on line 5
Notice: Undefined index: fname in B:\xampp\htdocs\keysmasters\loginsession\register.php on line 6
Notice: Undefined index: lname in B:\xampp\htdocs\keysmasters\loginsession\register.php on line 7
Notice: Undefined index: username in B:\xampp\htdocs\keysmasters\loginsession\register.php on line 8
keeezz 6 months ago in playlist Register & Login
where can i download your code ;))
adoyable02 6 months ago
Hey dude!!! Notice: Undefined Index (I Think its on $_POST) because my PHP Version are Latest (2011) please repair it!
MrRJProductionZ 6 months ago
muzzy4friends 6 months ago
I found out THE SOLUTION!
For all the persons who are using phpmyadmin online, to fix all those errors you just need to remove the "//form data" !!!!
all the errors will be fixed!
Thumbs up if it worked for you!
InteractiveSolid 6 months ago
Notice: Undefined variable: _post in C:\xampp\htdocs\Loginsystem\register.php on line 4
Notice: Undefined variable: _post in C:\xampp\htdocs\Loginsystem\register.php on line 5
Notice: Undefined variable: _post in C:\xampp\htdocs\Loginsystem\register.php on line 6
Notice: Undefined variable: _post in C:\xampp\htdocs\Loginsystem\register.php on line 7
romano8524 7 months ago
@romano8524 yeah thats my error too !!!
adoyable02 6 months ago
Can anyone explain the @ thing?
semaca2005 7 months ago
semaca2005 7 months ago
@semaca2005 Thank you! Thank you!
DHirschfelt 5 months ago
whats the point of encrypting your passwords when if someone managed to get in your database can use MD5 decrypter.
THE16THPHANTOM 8 months ago in playlist Register & Login
MD5 can be decrypted
MrMobinga 8 months ago
Comment removed
gentlxman 8 months ago
You should add some salt to the encryption. Otherwise the password is easily hackable using an rainbow table.
ChibaCityBlues 8 months ago
This has been flagged as spam show
the solution i used is get all the variables inside the first if and change the condition for "isset($_POST['submit'])" and put an else whit $fullname =""; $username=""; like this:
if(isset($_POST['submit']))
{ $name = strip_tags($_POST['name']); $username = strip_tags($_POST['username']); $password = strip_tags($_POST['password']); $repeatpassword = strip_tags($_POST['repeatpassword']); ...
}
else
{ $name=""; $username="";
}
notice i didn't use submit variable.
Nando7789 8 months ago
Guys.. This is self explainable. If you have errors, look at your script again. No need to post in comments, because all PHP errors are minor.. including the ones above. Sorry about being rude, but for someone like me who's seriously experienced in PHP it makes me cringe that people don't even know this much yet. :-/
Acceptable76 8 months ago
@Acceptable76 Please take a look at the video you're commenting on before saying stupid things. This is a tutorial which is obviously meant for people to LEARN. If we all would be experts like you're assuming, we wouldn't be watching this video!
ZTOID 8 months ago
@ZTOID Yeah, I kind of regret saying that, I was in a cocky mood. :-)
Acceptable76 8 months ago
your voice is music to my ears. ^^
makoto114 8 months ago
md5 has been cracked
harryrockin 9 months ago
Notice: Undefined index: submit in C:\xampp\htdocs\register.php on line 7
Notice: Undefined index: fullname in C:\xampp\htdocs\register.php on line 11
Notice: Undefined index: username in C:\xampp\htdocs\register.php on line 12
Notice: Undefined index: Password in C:\xampp\htdocs\register.php on line 13
Notice: Undefined index: repeatpassword in C:\xampp\htdocs\register.php on line 14
what is this plz sent exact code
bikenb1 9 months ago
@bikenb1 Read my comment below, it explains what is wrong with the code and what you need to do to ammend it.
themightyrobofish 9 months ago
@themightyrobofish .sory i didn't get it plz mail me code in my biken_b@yahoo.com .I am waiting for it.........
bikenb1 9 months ago
Notice: Undefined index: submit in C:\xampp\htdocs\register.php on line 7
Notice: Undefined index: fullname in C:\xampp\htdocs\register.php on line 11
Notice: Undefined index: username in C:\xampp\htdocs\register.php on line 12
Notice: Undefined index: Password in C:\xampp\htdocs\register.php on line 13
Notice: Undefined index: repeatpassword in C:\xampp\htdocs\register.php on line 14
Your Full Name:
Choose a username:
Choose a Password:
Repeat Your password:
bikenb1 9 months ago
Hi all.
You're getting the "Undefined index" error because the $_POST values you are trying to reference in the php code are not set until the form has been submitted. The best way around this is to add an if statement at the beginning of your php code which uses 'isset' to verify these values exist before trying to manipulate them.
The code you need to add is:
if( isset($_POST['submit']) && $_POST['submit']){
// This code will only run if $_POST['submit'] is set.
}
themightyrobofish 9 months ago 19
@themightyrobofish
Man thanks, that helped alot
GAZZAMASTA 9 months ago
@themightyrobofish
infact, it may just be the best thing since sliced bread?
GAZZAMASTA 9 months ago
@themightyrobofish It doesn't work
bikenb1 9 months ago
@bikenb1 It does work, but you need to put ALL of your php code inside of the if statement I gave you originally. Remembering that the post data 'submit' that the if statement is checking for are those set in your html form which are passed through the $_POST function. Its really not hard.
Again, the code you need to add is:
if( isset($_POST['submit']) && $_POST['submit']){
// Initialise $_POST variables eg:
$first_name = $_POST['first_name'];
// etc..
}
themightyrobofish 9 months ago
This has been flagged as spam show
@themightyrobofish I didnt get it.plz mail me i am really getting problem.(bikenb123@gmail.com)plz with php code only
bikenb1 9 months ago
@themightyrobofish then i get Notice: Undefined variable: submit in D:\xampp\htdocs\site\register.php on line 31
MegaLuka99 6 months ago
Comment removed
keeezz 6 months ago in playlist Register & Login
@themightyrobofish did tht still doesnt change anything
keeezz 6 months ago in playlist Register & Login
@themightyrobofish Thanks but it didn't help.. I added that to the register.php file. Is that what I'm supposed to do?
smokenfly514 3 months ago
@themightyrobofish you have to take out the space like:
if (isset($_POST['submit'])){
// This code will only run if $_POST['submit'] is set.
}
realtuty 3 months ago in playlist More videos from phpacademy
I keep getting an "undefined index" error message, but when I submit the form when it's all empty it goes away. I think it needs a default value or something could you please help?
JSunJShineR1 9 months ago
Hi the solution of submit button is quite easy try give a name to your input
input type='submit' name='submit' value='register'
now $submit=$_POST['submit'];
should work.
bobasbbc 9 months ago
instead of using the md5() function, you're better off using the hash('sha256, $password)
Zuberguber105 9 months ago
if password is gonna be encrypted so why to strip tags for it?
corvus02 10 months ago
need help!
gymdani999 10 months ago
69hwoarang 10 months ago
@69hwoarang You fail.
DavidRockin1 9 months ago
This has been flagged as spam show
i get this
Notice: Undefined index: submit in C:\xampp\htdocs\Mikel's Website\register.php on line 4
Notice: Undefined index: fullname in C:\xampp\htdocs\Mikel's Website\register.php on line 6
Notice: Undefined index: username in C:\xampp\htdocs\Mikel's Website\register.php on line 7
Notice: Undefined index: password in C:\xampp\htdocs\Mikel's Website\register.php on line 8
Notice: Undefined index: repeatpassword in C:\xampp\htdocs\Mikel's Website\register.php on line 9
Please help me!!!!
mikekevinvideos 10 months ago
Comment removed
mikekevinvideos 10 months ago
ive fixed part of the script but i still get this
Notice: Undefined variable: submit
DAREDEVIL94reaL 10 months ago
i am using WAPM
DAREDEVIL94reaL 10 months ago
i have error
Notice: Undefined index: submit
Notice: Undefined index: fullname
Notice: Undefined index: username
Notice: Undefined index: password
Notice: Undefined index: repeatpassword
Notice: Undefined variable: submit
WHAT SHOUD I DO ?
DAREDEVIL94reaL 10 months ago 4
@DAREDEVIL94reaL kill yourself
JOSAUG32 10 months ago
Help PLEASE! The method="post"> isn't working!! after i press submit nothing happens! It just redirects me to regpage again !! Help please!
Ghand0ur 10 months ago
This has been flagged as spam show
twakskawt 10 months ago
This has been flagged as spam show
twakskawt 10 months ago
I got this error "Deprecated: Call-time pass-by-reference has been deprecated in C:\xampp\htdocs\register.php on line 8" when i tried to put md5 on &$_POST['password'] and &$_POST['rpword'] but i fixed it by declaring $password and $rpassword as md5.
e.g
$password = &$_POST['username'];
$rpassword = &$_POST['rpassword'];
$pw = md5 ("$password");
$rpw = md5("$rpassword");
Hope it helps guys.
twakskawt 10 months ago
Thank you iTwistar that worked perfectly. The warnings are gone and everything works the way I want them too as soon as I publish my site I will leave a link in the comment area of the last tutorial in this series which is Email activation(part5) . Now my thanks to phpacademy for theses tutorials I never touched or really looked at PHP or HTML before a week ago. Thank again and keep them coming. Very good tutorials easy to understand and learn from.
JuvanileDelinkwent 11 months ago
I keep getting a Parser error at the submit - $_POST['submit'] part. What is the solution to this problem?
avirupsil 11 months ago
are these tutorials out of order or..?
TheBlakeWilliamson 11 months ago
Solution for strip tag:
$usernamer=&$_POST['username'];
$passwordr=&$_POST['password'];
$rPasswordr=&$_POST['rPassword'];
$username = strip_tags($usernamer);
$password = md5(strip_tags($passwordr));
$rPassword = md5(strip_tags($rPasswordr));
iTwistar 11 months ago 3
This has been flagged as spam show
You can also replace:
$submit= & $_POST['submit'];
$fullname=& $_POST['fullname'] ;
$username=&$_POST['username'];
$password=&$_POST['password'];
$repeatpassword=&$_POST['repeatpassword'];
with:
if (!empty($_POST["fullname"]) && !empty($_POST["username"]) && !empty($_POST["password"]) && !empty($_POST["repeatpassword"]))
Bveb 11 months ago
This has been flagged as spam show
You can also replace:
$submit= & $_POST['submit'];
$fullname=& $_POST['fullname'] ;
$username=&$_POST['username'];
$password=&$_POST['password'];
$repeatpassword=&$_POST['repeatpassword'];
with:
if (!empty($_POST["fullname"]) && !empty($_POST["username"]) && !empty($_POST["password"]) && !empty($_POST["repeatpassword"]))
Bveb 11 months ago
This has been flagged as spam show
You can also replace:
$submit= & $_POST['submit'];
$fullname=& $_POST['fullname'] ;
$username=&$_POST['username'];
$password=&$_POST['password'];
$repeatpassword=&$_POST['repeatpassword'];
with:
if (!empty($_POST["fullname"]) && !empty($_POST["username"]) && !empty($_POST["password"]) && !empty($_POST["repeatpassword"]))
Bveb 11 months ago
This has been flagged as spam show
You can also change:
$submit= & $_POST['submit'];
$fullname=& $_POST['fullname'] ;
$username=&$_POST['username'];
$password=&$_POST['password'];
$repeatpassword=&$_POST['repeatpassword'];
to:
if (!empty($_POST["fullname"]) && !empty($_POST["username"]) && !empty($_POST["password"]) && !empty($_POST["repeatpassword"]))
Bveb 11 months ago
OK the solution
$submit =&$_POST['submit];
and the rest of the &$_POST work for a minute and then when you start to do
$fullname = strip_tags(&$_POST['fullname']);
gives a Deprecated: Call-time pass-by-reference has been deprecated in C:\xampp\htdocs\register.php on line 9
I have gone all the way through to the Changing password tutorials and every thing works but just need to get rid of the Warnings any thoughts on that.
JuvanileDelinkwent 11 months ago
solution here:
$submit= & $_POST['submit'];
$fullname=& $_POST['fullname'] ;
$username=&$_POST['username'];
$password=&$_POST['password'];
$repeatpassword=&$_POST['repeatpassword'];
Jimd5353 11 months ago 3
@Jimd5353 It worked. Tough , i don`t really understand why.
hantataru 8 months ago
just getting errors EG/
Notice: Undefined variable:_post in C:xampp/htdocs/test/resgister.php on line 4
and line 7, 8, 9 and 10 need help.
Phenom24gtr 11 months ago
it says Notice: Undefined index: submit in C:\xampp\htdocs\Browsergame\register.php on line 3
Notice: Undefined index: fullname in C:\xampp\htdocs\Browsergame\register.php on line 4
Notice: Undefined index: username in C:\xampp\htdocs\Browsergame\register.php on line 5
Notice: Undefined index: password in C:\xampp\htdocs\Browsergame\register.php on line 6
Notice: Undefined index: repeatpassword in C:\xampp\htdocs\Browsergame\register.php on line 7
Guitaremalte 11 months ago 14
@Guitaremalte I keep getting the same errors as you! Has anyone got a solution?!
nickynae 11 months ago
@Guitaremalte did you found a solution ? please write back
DAREDEVIL94reaL 10 months ago
@DAREDEVIL94reaL no sorry I didn^
t
Guitaremalte 10 months ago
@Guitaremalte
I've got the same problem as you had. Any ideas yet?
spikey79 9 months ago
@Guitaremalte I too Got the same error.. Someone please help me..
joyalbenni1 8 months ago
@Guitaremalte
i wonder, could you please please please make a video on why this might be happening? i cant think of anything that could be causing it for us and not you :(
jakewestgomila 8 months ago
@jakewestgomila
Just add @ in front of the $_post of each variable
$submit = @$_POST ['submit'] ; $firstname = @$_POST ['firstname'] ; $lastname = @$_POST ['last
jokak001 8 months ago 21
@jokak001 what does @ do, specifically? Anyway, it works! Finally! Thank you very much!
114makoto 8 months ago
@jokak001 Thanx a lot i did 2 it works !
gentlxman 8 months ago
@jokak001 Thank you!!
econdoc 8 months ago
@jokak001 TNX A LOT!!!!
MegaLuka99 6 months ago
Comment removed
jusT4L3x 8 months ago
Comment removed
jusT4L3x 8 months ago
@Guitaremalte Add an @ sign before declaring the variables.
Grkgermn333 7 months ago
@Grkgermn333 this @ really works
thnx great
btw what's the logic of '@' here..
zaris22 7 months ago
@zaris22 From php.net:
"When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored."
Grkgermn333 7 months ago
@Grkgermn333 thnx prfctly undrsood......gr8 tutorial
zaris22 2 months ago
@Guitaremalte These are only "Notices" they do not terminate the rest of the code like regular Errors do... from now on what you should do is add an @ symbol in front of all of the $_POST variables to tell the code to ignore notices thrown by the $_POST variable. hope i explained this properly... the answer to your question lies here:
phpacademy(dot)com/
register-login-user-registration-part-2-t692.html#p3563
TwizzyTheWizzy 7 months ago
@Guitaremalte I'm getting the same notices
soderlund98 6 months ago in playlist Titta senare :P
Alex!
Can You Send Hole Register system to my email
plese
plese
becuse i have many error in it
bhushanbhushans 11 months ago
Thank you very much man!! very helpful!!
ninjafoxinteractive 11 months ago
This has been flagged as spam show
Before using the variable, you can check if it exists, for example:
replace the line:
$submit = $_POST['submit'];
by:
if(isset($_POST['submit'])) { $submit = $_POST['submit']; }
else $submit = "";
and in case of MD5, do the following:
if(isset($_POST['repeatpassword'])) { $repeatpassword = md5($_POST['repeatpassword']); }
else $repeatpassword = "";
marciokalil 11 months ago
im getting an error saying:
Notice: Undefined index: submit in C:\xampp\htdocs\loginsession\register.php on line 4
XxMinerLordxX 11 months ago
Hi ggetting this error plz solve as soon
Notice: Undefined index: submit in C:\xampp\htdocs\fyp\register.php on line 3
Notice: Undefined index: fullname in C:\xampp\htdocs\fyp\register.php on line 5
Notice: Undefined index: username in C:\xampp\htdocs\fyp\register.php on line 6
Notice: Undefined index: password in C:\xampp\htdocs\fyp\register.php on line 7
Notice: Undefined index: repeatpassword in C:\xampp\htdocs\fyp\register.php on line 8
SibteinTv 11 months ago
@SibteinTv do it like this:
$fullname = $_POST["fullname"] = "undefine";
$username = $_POST["username"] = "undefine";
$password = $_POST["password"] = "undefine";
$repassword = $_POST["repassword"] = "undefine";
TheHumanBanana 11 months ago
@TheHumanBanana but this returns undefine when i put username pass and press register it returns undefine in all fields like this undefine/undefine/undefine/undefine
SibteinTv 11 months ago
@SibteinTv
I had the same errors mate, but I just followed PeterLifeOnline's advice
put &before the $_POST['username'];
simply : & $_POST['username'];
ninjafoxinteractive 11 months ago
Great Job
gajepapponetti 1 year ago
oh i solved that problem by putting & before $_POST exemple:
$fullname = &$_POST['fullname'];
but now when i put md5 i get and error
Deprecated: Call-time pass-by-reference has been deprecated in C:\xampp\htdocs\c4php\loginsession\register.php on line 10
PeterLifeOnline 1 year ago
This has been flagged as spam show
@PeterLifeOnline
Before using the variable, you can check if it exists, for example:
replace the line:
$submit = $_POST['submit'];
by:
if(isset($_POST['submit'])) { $submit = $_POST['submit']; }
else $submit = "";
and in case of MD5, do the following:
if(isset($_POST['repeatpassword'])) { $repeatpassword = md5($_POST['repeatpassword']); }
else $repeatpassword = "";
marciokalil 11 months ago
@PeterLifeOnline what hapen if you put @ instead of &
SibteinTv 11 months ago
@PeterLifeOnline did you find out the solution? dealing with the same problem here. write back please
hantataru 8 months ago
@hantataru Forget this tutorial, i have seen others way more easy... this you problably can´t put on internet because it's local host...
so just search for other tutorials outside youtube..
PeterLifeOnline 8 months ago
help me... please!!
great tutorials i am subscribe you right now :)
PeterLifeOnline 1 year ago
This has been flagged as spam show
help me!!! please....
PeterLifeOnline 1 year ago
Undefined index: submit in C:\xampp\htdocs\c4php\loginregister\register.php on line 4
why!? I Try everything what is wrong?
$submit = $_POST['submit'];
PeterLifeOnline 1 year ago 3
Your tuts helped me a lot :)
Show me some ads bro I'll click 25times :) a nice way to donate :)
ilifeform 1 year ago
This has been flagged as spam show
Why we need a, latin bitch busizz4me.info
DonsanUsake569 1 year ago
I Love You alex
Thankyou So Much For teaching us without any greed
scaitime 1 year ago
What can casue this error?
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'localhost' (using password: YES) in C:\adress\registerDOTphp on line 12
Error connecting to mysql
wach9191 1 year ago
love you dude! your the man!!
danny02c 1 year ago
Alex your are the best.. love your tutorials!
jackrios2 1 year ago
when i go on my register.php page before filling the form in or clicking the button, i get the following error -- Notice: Undefined index ....
toqi786 1 year ago
This has been flagged as spam show
ya even i am having problem with $_POST['submit']; it doesn't show any error but it's not doing anything either... i tried without it ant it works. could you explain the use/importance of it and reason why it's not working on mine. I am using xampp.
mdeepakpun 1 year ago
Comment removed
mdeepakpun 1 year ago
This has been flagged as spam show
Heck out the thousands of profiles for Naughty women mworld5.info
MARGRETDOLORES 1 year ago
This has been flagged as spam show
Local BBW women in your door step naneedj.info
hildabrooks 1 year ago
Wow man I appreciate all these tutorials
JoeShonMonroe 1 year ago
thanks.......I learn lot!!!!!
buwa119 1 year ago
$submit = $_POST['submit']; GETING PROBELM :(
theamirjee 1 year ago 6
@theamirjee check your submit button's code has " name='submit' " or not.
vincenttky 1 year ago
This has been flagged as spam show
Search online Russian women gettop5.info
rvfasdsanzczs 1 year ago
Well nice trick actually, you set your username to an image, and when it's echoed it will display the image
coolguyflex 1 year ago
that's odd
this code won't work.
the part where you put Register after the echo won't work. why is that?
rickyb0i 1 year ago 2
Well mine didn't work...As of about 4 minutes in.
TheMrChugger 1 year ago