php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40971 Unexpected T_Variable (New to This)
Submitted: 2007-04-01 05:46 UTC Modified: 2007-04-01 09:50 UTC
From: MSIHelper at gmail dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.2.1 OS: WinXP
Private report: No CVE-ID: None
 [2007-04-01 05:46 UTC] MSIHelper at gmail dot com
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-01 09:50 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 23:01:29 2024 UTC