|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-01 09:50 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 20:00:01 2025 UTC |
Description: ------------ Hello - THANK YOU SOOOOO MUCH FOR YOUR ASSISTANCE. (I am NEW to ALL this, so PLEASE excuse my inability to explain the Right Details) An aquaintance, Mr. Lyles (willyjlyles@yahoo.com) who is a Great Computer Networker/Repair/etc. is helping me to Automate the SignUP & Login of my NEW site www.IncomeGains.Bravehost.com _____________________________________________________________________ PROBLEM w/ IGcreate.php (www.IncomeGains.Bravehost.com/IGcreate.php) IGcreate.php (i believe) collects or recieves the inputed data and 1.) EMAILS the New Member with a Message and their access info. 2.) EMAILS Admin with the New Member info. Parse error: syntax error, unexpected T_VARIABLE in xxxxxxxx/incomegains.bravehost.com/IGcreate.php on line 31 Line 31 starts with $MSImsg ALSO, we are using www.Bravenet.com as the Professional Host Server, but I think it is PHP ready, because it at least reads upto line 31 RIGHT? or do we need to install PHP5? Here is the Code: (Do we need to add a Recipient) ???? (Do we need ' before/after names in []), like: $_POST['Email'] ???? (Do we need to take-out .'s and ".s between all the <br> and $_POST) ???? _____________________________________________________________________ <?php include("config.php"); // connect to the mysql server $link = mysql_connect($server, $db_user, $db_pass) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($database) or die ("Could not select database because ".mysql_error()); // check if the username is taken $check = "select id from $table where Email = '".$_POST[Email]."';"; $qry = mysql_query($check) or die ("Could not match data because ".mysql_error()); $num_rows = mysql_num_rows($qry); if ($num_rows != 0) { echo "Sorry, the username $Email is already taken.<br>"; echo "<a href=register.html>Try again</a>"; exit; } else { // insert the data into database $insert = mysql_query("insert into $table values ('NULL', '".$_POST[Email]."', '".$_POST[Password]."')") or die("Could not insert data because ".mysql_error()); // send the emails $msg = "WELCOME to the Income Gains," . $_POST[FirstName] . " " . $_POST[LastName] . "!"; //!!!!!!!!!Message that will be emailed to user!!!!!!!!!!!!!!! $subject = "WELCOME to the Income Gains." //Subject of message emailed to user. After this is the stuff that is emailed to you. $MSImsg = "Email: $_POST[Email] <br>Name: $_POST[FirstName] . " " . $_POST[LastName] <br>Zip: $_POST[Zip] <br>Password: $_POST[Password] . "!"; $MSIsubj = "New Member"; mail("Example@here.com", $MSIsubj, $MSImsg); mail($_POST[Email], $subject, $msg); // print a success message echo "Your user account has been created!<br>"; echo "Now you can <a href=Login.html>log in</a>"; ************************************************************************************************* THANKS FOR ALL YOUR HELP contact info: MSIHelper@gmail.com I REALLY APPRECIATE IT Reproduce code: --------------- www.IncomeGains.Bravehost.com/IGcreate.php Expected result: ---------------- He made 4 files: config.php, IGcreate.php, createtable.php, login.php When people Register/SignUp (i believe): it goes to the config.php --> IGcreate.php --> then createtable.php inputs information into the SQL Database - we made, so (Login Page's SUBMIT) login.php can verify and let them have access. ************************************************************************************************* THANKS FOR ALL YOUR HELP contact info: MSIHelper@gmail.com I REALLY APPRECIATE IT