mingger
Members-
Posts
18 -
Joined
-
Last visited
Never
Everything posted by mingger
-
Hey I have a question (: when the user just closes the window without logging out, how will it be able to change the row of the database?
-
Thank you very much for the help! I think that i can get it to work now
-
Hello Thank you for the help, but im not very talented in javascript and ajax yet. So if you could write out the whole code for this, i would be so blessed
-
Hey I hope this is the right place to put this question.... I'm trying to make a social network(Just to test what i can do), and i wanted to make a feature so that u could check if a person is online or not. So the person could start a chat session with a user, i have no idea how u could make this. So i hope that there is some genius that will help me with this. Thank you - Nicolaj
-
Hey Thank you for helping. Im sorry for not saying the error, that was kinda dum Its not writing any errors back or anything when i press the submit button, and it does not change the email_a...
-
Hey php gods! I recently watched a tutorial on how to make a membership system, it all turned out fine n stuff. So i wanted to expand and i found out a way to make a email activation "thingie", by making 2 new rows. 1 called email_code and a second called email_a(a for activate). When the person then registered, he woulld get a email where he should go to a link and write a code that was generate with a rand fuction and placed in the email_code row in the database. Then when the person wrote his username and the code in a form from the link in the email, the email_a would change from 0 to 1 if the username matched to the code he got. (sry for bad english). anyway here is the code: <!DOCTYPE html> <html> <head> <link href="style.css" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Activate email</title> </head> <body> <form action="" method="POST"> Username:<input type="text" name="username"> Code:<input type="text" name="activate"> <input type="submit" name="submit" value="aktiver"> </form> <?php include 'connect.php'; $username = $_POST('username'); $activate = $_POST('activate'); $submit = $_POST('submit'); $query = mysql_query("SELECT username AND email_code FROM user"); while ($row = mysql_fetch_assoc($query)){ $dbusername = $row['username']; $dbcode = $row['email_code']; } if ($_POST['submit']){ if ($username==$dbusername&&$code==$dbcode){ mysql_query("UPDATE users SET email_a = '1' WHERE username = '$username' AND email_code = '$activate'"); echo "Du er blevet aktiveret"; } else echo "Forkert data"; } else ?> </body> </html> Hope you can help me MinG
-
Omfg, you are amazing !!! ;b btw i watched a tutorial by phpacademy on youtube. and when the error popped up i tried to fix it, but i couldnt. so i stopped half passed the video, and searched for answers. that maybe explains some missing code. Thank you again, if there is anything i can do to support you on some way, please let me know - MinG
-
Can you please describe it with some php code ? im new to this shit. So i dont know what to do.
-
Hey thanks for the reply. you can go to my test website here: and write some random text in the text boxes and press log in. i watched this tutorial: http://www.youtube.com/watch?v=4oSCuEtxRK8. here is the comments on English, i know there is something wrong with the else/if and dreamweaver says that its the else i now marked bold: echo "You are now logged in $username" } else echo "The password is wrong"; } else die("The user doesnt exist"); } else die("please write username and password."); Thanks again - MinG
-
Hey php masters ! i ran into a problem while making my login page, im new to php so please dont rage at me the code that i think gives the problem is this: if ($numrows!=0) { while ($row = mysql_fetch_assoc($query)) { $dbusername = $row['username']; $dbpassword = $row['password']; } if ($username==$dbusername&&$password==$dbpassword) { echo "du er logget ind $username" } else echo "Adgangskoden er Forkert"; } else die("Denne burger findes ikke"); } else die("Angiv venligst brugernavn og adgangskode"); ?> Hope you can help me - MinG
-
But i dont know how and what i should do
-
Cant you help :/
-
I want to add menu tabs by the form
-
it works for the most, but i want to make it as a php file so that it puts php code in it automatic.
-
Okay now i know that it is not writable, but how to i make it writeable.
-
It makes the file but it doesnt write anything into it. No it does not give any errors
-
This is the form, and there is no more php code: <form action="myform.php" method="post"> <p>Site name <input type="text" name="sitename" />remember to put .php<br /> title <input type="text" name="title" /></p> <p>Do you like this website? <br><input type="radio" name="likeit" value="Yes" checked="checked" /> Yes <br><input type="radio" name="likeit" value="No" /> No <br><input type="radio" name="likeit" value="Not sure" /> Not sure</p> <p>Your comments:<br /> <textarea name="comments" rows="10" cols="40"></textarea></p> <p><input type="submit" value="Send it!"></p> </form> btw. thanks for helping
-
Hey guys i've been trying to find out how to create and and write in a file, so that you can for example add a nav button to your website by form (you know like a admin panel). It tried some things but it doesnt work cause it wont write to the file... here is the code i've used: $ourFileName = $_POST['sitename']; $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); fclose($ourFileHandle); $myFile = $_POST['sitename']; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = "test\n"; fwrite($fh, $stringData); $stringData = "test\n"; fwrite($fh, $stringData); fclose($fh); the "sitename" is the id from the form where you choose what the menu tab should be called. I would really glad if you could help me out with this one thanks! MinG