PHP - Moved: Phpmyadmin - People Registered But Account Not Active?
This topic has been moved to PHP Applications.
http://www.phpfreaks.com/forums/index.php?topic=323073.0 Similar TutorialsThis topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=350218.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=352409.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=359282.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=355485.0 Hi all, Here i have a serious problem. I want to sought it out using PHP and MySQL only. I have a form includes fields of customer id and Account type( stored in a jump menu and includes 6 different types of accounts) <style type="text/css"> <!-- body,td,th { font-size: 18px; font-weight: bold; } --> </style> <p><img src="../images/mahapitiya 1.jpg" width="1024" height="139" /></p> <form id="form1" name="form1" method="post" action=""> <label> <input type="submit" name="button" id="button" value="Logout" /> </label> </form> <p> </p> <form action="" method="post" name="form2" id="form2" onsubmit="return Validate();"> <fieldset> <legend class="cap">Create an Account</legend> <table width="75%" border="0" cellspacing="0" cellpadding="5" align="center"> <tr> <td> </td> <td class="title02"> </td> <td> </td> <td> </td> </tr> <tr height="30"> <td width="10%"> </td> <td width="25%" class="title02" align="left">Customer ID</td> <td width="55%" class="attribute1" align="left"><input type="text" name="customer_id" class="attribute1" /></td> <td width="10%"> </td> </tr> <tr height="30"> <td> </td> <td width="25%" class="title02" align="left">Account Type</td> <td width="55%" align="left" bgcolor="#FFFFFF" class="attribute1"><select name="account_type" id="jumpMenu" > <option selected="selected"></option> <option>Savings Investment</option> <option>Shakthi</option> <option>Surathal</option> <option>Abhimani Plus</option> <option>Yasasa Certificates</option> <option>Fixed Deposits</option> </select> </td> <td width="10%"> </td> </tr> </table> <p align="center"> </p> <p align="center"> <input type="submit" onclick="return Validate();" name="submit" value="Submit" class="attribute1" /> <input type="reset" name="reset" value="Reset" class="attribute1" /> <label> <input type="submit" name="button2" id="button2" value="Help" /> </label> </p> </fieldset> </td> <td width="5%"> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td align="center"> </td> <td> </td> </tr> <tr> <td> </td> <td><font color="red" size="1" ></font></td> <td> </td> </tr> </table> </form> <p> </p> <script language = "Javascript"> function Validate() { if (document.form2.customer_id.value == '') { alert('Please enter the valid customer id!'); return false; } else if ( document.form2.account_type.selectedIndex == '' ) { alert ( "Please select an account type!." ); return false; } return true; } </script> There are 6 different types of tables exist in my database representing 6 different types of accounts.Each and every table there is a field called "account number" which is auto incremented.When user clicks on submit button i want account number to be opened based on selected account type. How this could be done? Thanks, Heshan. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=309461.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=314698.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=355885.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=308807.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=344720.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=321126.0 hi everyone i was wondering if anyone has any idea how i can make my php links look like this "wwwDOTmysiteDOTcom/xxx.php?s=account" right now they look like this "wwwDOTmysiteDOTcom/account.php" thanks... This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=317523.0 Hi. I have wrote a simple login script. Works perfectly. Now as my users can only register one email address at the minute if you register two the same you get the default sql error pop up. I want my own error so at the beginning of my script i wrote the following code. however. It does not seem to be running. It does not create an error but still allows duplicate emails in the database. can anyone see the error of my ways? <?php session_start(); if(isset($_POST['create'])){ //script for checking if the email account already exists $qCheckEmail = "SELECT * FROM members WHERE email='".$_POST['email']."'"; $rCheckEmail = mysql_query($qCheckEmail); $Email = mysql_fetch_array($rCheckEmail); if($_POST['email'] == $Email['email']) {$emailDup = "This email account has already been registered";} else { //Process data for validation $forename = trim($_POST['forename']); $surname = trim($_POST['surname']); $email = trim($_POST['email']); $password = trim($_POST['password']); $gender = trim($_POST['gender']); $birthday = $_POST['birthday']; $creationdate = $_POST['creationdate']; $validationID = $_POST['validationID']; $accesslevel = trim($_POST['accesslevel']); $accountType = trim($_POST['accountType']); // then the rest of the login script here Hello, i'm trying to get the number of users that registered today and the number of users that registered yersterday (seperate), i've got this field in mysql: 'registertime' which stores data in this format 2011-11-14 14:53:49 also i have the field 'time' in the same format that updates everytime the user logs in. Now previously i wanted to find out users online in last 24 hours, the code i used for that is this: Code: [Select] $query = "SELECT COUNT(*) as Anzahl FROM customers WHERE country = 'de' AND time BETWEEN DATE_SUB( NOW(), INTERVAL 24 HOUR ) and NOW() "; $queryerg = mysql_query($query) OR die(mysql_error()); while($row = mysql_fetch_array($queryerg)){ $customers_on_de_24 = $row[0]; } How could i edit that to select the count just by date and ignore the time (hours minutes seconds) ? Hello everyone.
I have a fully working form that gets data from a user (with $_post array) , and stores it in a database (mysql).
After successfulIy filling the form, I refer him to the "dashboard" page. In this page, i am having trouble to get his details from the database. How should I recognize him as the user that just registered?
should I use a $_post? or maybe a session? could you please give me a clue how to solve this?
Hello everybody, This is my first post here and I am beginner in PHP world in terms of writing the code to serve my own purposes. Well I am building a web app and basically it's a calendar which pulls information from .js file. Now I have thinking for the past couple of days how can I accomplish that each user that registers on the site manipulates its own .js file because information from .js file will be shown on calendar. Let me tell you how it's currently set up: 1. JavaScript file with particular static name is called under the script that is placed on index.php and the data is displayed on the page itself. So I would love to have is set it up like this: 1. Index page contains login form - Each registered/logged in user will have its own session 2. User registers and based on username/email new .js file is created out of a blank template and it is named based on user's username 3. user is then redirected to the calendar index which contains javascript that cals out that appropriate .js file based on the what user is logged in and displays data to the calendar I am not sure if that is doable with PHP or not but that's my thinking how it can be done if it's doable. I am open for any kind of suggestions how all this can be put together and if you do have better ideas I would love to hear from you. Okay, I have a field called "created" in my `users` table, and I'd like to be able to view it in-game on an administrator panel. However, it's being captured in a long number format (i.e. 1335076320) which, I believe, has to deal with seconds and such. How can I take that number and convert it to an actual date/time output? Here's how I currently have it coded in my php form: <tr><td width="20%">Registered On:</td><td>{{created}}</td></tr> So, obviously it's not converting it to any format, rather just pulling that 1335076320 number out. Thanks in advance! less than 6 characters. I think it's the way my code is ordered. I've tried switching the commands around, no luck. Help please. Code: [Select] <?php //begin register script $submit = $_POST['submit']; //form data $username= strip_tags ($_POST['username']); $email= strip_tags($_POST['email']); $pwd= strip_tags($_POST['pwd']); $confirmpwd= strip_tags($_POST['confirmpwd']); $date = date("Y-m-d"); if ($submit) { //check for required form data if($username&&$pwd&&$confirmpwd&&$email) { //check length of username if (strlen($username)>25||strlen($username)<6) { echo "<p class='warning'>username must be bewteen 6 and 25 characters</p>"; } else { //check password length if (strlen($pwd)>25||strlen($pwd)<6) { echo "<p class='warning'>password must be between 6 and 25 characters</p>"; } else { //register the user echo "<p class='success'>Thanks for signing up!</p>"; } } //check if passwords match if ($pwd==$confirmpwd) { } else { echo "<p class='warning'>your passwords do not match</p>"; } //encrypt password $pwd = md5($pwd); $confirmpwd = md5($confirmpwd); //open database $connect = mysql_connect("xxxxxxxx", "xxxxxxxx", "xxxxxxxx"); mysql_select_db("digital"); //select database //register the user $queryreg = mysql_query(" INSERT INTO users VALUES ('','$username', '$email', '$pwd') "); die("<p class='success'>Thank you for signing up you have been registered"); } else { echo "<p class='warning'>please fill in all fields</p>"; } } ?> |