Jump to content

energysuperstore09

Members
  • Posts

    88
  • Joined

  • Last visited

    Never

Everything posted by energysuperstore09

  1. thank you for actual help. For the other comment, We don't need you to comment if your going to be a smart ass. Thanks.
  2. What would my php script look like if I just wanted the data from a form on my website to simply be stored into the database? this is probaly a stupid question, but this forum I found to be very helpful. Any help would be appreciated.
  3. I want to setup a search bar on my home page of course will search the site for the relevant keword typed in. How hard would this be and where would I start. Thanks
  4. I want to discourge people from using fictisous emails just to get login info
  5. so i used the code that i posted and i put a email address that didn't even have the @ symbol in it and it echoed that it was a valid email address. any advise as I am new to the php thing
  6. So i would use this? <?php $email = "someone@example.com"; if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { echo "Valid email address."; } else { echo "Invalid email address."; } ?>
  7. what would the process be to have them reply to an email with a code.
  8. I have a login page where they have to regsiter for a login and password, but I want to make sure they enter a valid email address. Does anybody know how I would do that?
  9. I do plan to continue to use php after this project as I am getting more comfortable with the database side of things.
  10. sorry. I didn't even think myinfo being posted on there. No I don't the error thing. See I am getting into this php thing because my boss wanted a login for our distributors. Problem is that I didn't know a whole lot about it. So thats why I have joined this forum. The database side I am starting to get because I am taking classes in MYSQL Server 2005. But this is still difficult to learn.
  11. Here is the link to the page http://www.texasfluorescents.com/distributorlogin.html
  12. Its ok. I understand. Here is the code that is on the register page for the login: <?php $email = $_POST['email']; $password = $_POST['pass']; $password2 = $_POST['pass2']; @mysql_connect("xxxx","xxx","xxx") or die("Error: unable to connect to database"); @mysql_select_db("test09"); $result = mysql_query("SELECT * FROM `loginreg` WHERE `email`='$email'"); if (mysql_num_rows($result) != 0) { die("Another account is already using that email"); } if ($password != $password2) { die("The two passwords did not match"); } $password = md5($password); mysql_query("INSERT INTO `loginreg` ( `repnumber` , `fname` , `lname` , `cname` , `phone` , `email` , `username` , `password` ) VALUES ( '$repnumber', '$fname', '$lname', '$cname', '$phone', '$email', '$username', '$password' ) ") or die(mysql_error()); echo "Your account was successfully created!"; ?>
  13. ok. I wasn't sure if they had to be in the same order. I am new to this and it def can get underneath your skin. Let me put them in order and see if they work. Also no I am not using Mysql error to debug. Could you explain?
  14. here is the INSERT string that I put in and I am still not getting data stored into the database. The email, password, first name (fname) is getting stored, but not the other data mysql_query("INSERT INTO `loginreg` ( `repnumber` , `fname` , `lname` , `cname` , `phone` , `email` , `username` , `password` ) VALUES ( '$email', '$password', '$fname', '$lname', '$repnumber', '$cname', '$phone', '$username' )
  15. When people register for a login I want the data to be stored into the database. Right now the only data stored is email, password, id, and approved. All my other columns are blank. Below is my table structure I use an INSERT command, but it is still not storing the other data submitted into the database. Can anybody help? CREATE TABLE IF NOT EXISTS `loginreg` ( `id` int(11) NOT NULL auto_increment, `repnumber` text NOT NULL, `fname` varchar(50) NOT NULL, `lname` varchar(50) NOT NULL, `cname` text NOT NULL, `phone` text NOT NULL, `email` text NOT NULL, `username` text NOT NULL, `password` text NOT NULL, `approved` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
  16. would this script go on the webpage where they login?
  17. what would the script look like as far as checking too see if the column approved value is changed?
  18. I have built a login page where distributors can register for there own username and password to access important informtion. Problem is that anybody can register and view this information, which is not for everyone to see. Is there a way that when users register that I can approve that user and also send a email motifying the user that there login is pending approval? And how I would go about doing this? As this is a request at my job and in need of help as I am new to php. The following is a link to my login page and below is my table structure in my database. HELP? PLEASE CREATE TABLE IF NOT EXISTS `accounts` ( `repnumber` text NOT NULL, `fname` text NOT NULL, `lname` text NOT NULL, `cname` text NOT NULL, `phone` text NOT NULL, `email` text NOT NULL, `username` text NOT NULL, `password` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  19. as I am trying to figure this out I am new to this. Could you maybe give me an example? Thanks.
  20. I made a login page where people can register for there own username and password. Is there a way that when people regsiter I have to approve is before they can actually login. There is info where only certain people can view, but right now anybody can register and login. I want to make sure that they are the people that can view this information. Also how can I make it auto generate a email notifying that someone will be approveing it and will notify once approved that they can now login. Any help would be appreciated. Thanks.
  21. here is the link to my website where peopl would register: http://www.texasfluorescents.com/distributorlogin1.html
  22. ok. this is what I got: CREATE TABLE IF NOT EXISTS `accounts` ( `repnumber` text NOT NULL, `fname` text NOT NULL, `lname` text NOT NULL, `cname` text NOT NULL, `phone` text NOT NULL, `email` text NOT NULL, `username` text NOT NULL, `password` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; This is my table structure My INSERT QUERY DID WORK Looks like this: mysql_query("INSERT INTO `accounts` (`repnumber`, `fname`, `lname`, `cname`, `phone`, `email`, `username`, `password`) VALUES ('$repnumber', '$fname', '$lname', '$cname', '$phone', '$email', '$username', '$password')"); The problem now is when I regsiter for the login the only data that shows up in my database is the fname, email, password. All the others such as lname, phone, cname, repnumber, doesn't show up.
  23. i go the first name (fname) to work but when I try to do the last name (lname) like i did the first, MYSQL gives me an error messege stating that i don't have lname is an unknown column. The column is there and don't understand why it would give me this error messege.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.