Jump to content

disable register


searls03

Recommended Posts

ok so I have this code.  I need to know how to modify it so that if the user has already registered for the event, they cannot do so again.........how can I do this?  does this make sense? members that have already registered are held in a table called events..........userid, eventid, name, subevent.......

<?php

$sql = mysql_query("SELECT * FROM Registration WHERE eventid=".$_GET['eventid']." LIMIT 1");
while($row = mysql_fetch_array($sql)){
$eventid = $row["eventid"];
$event = $row["event"];
$startdate = $row["startdate"];
$enddate = $row["enddate"];
$description = $row["description"];
$location = $row["location"];
$title1 = $row['title1'];
$title2 = $row['title2'];
$title3 = $row['title3'];
$title4 = $row['title4'];
$title5 = $row['title5'];
$title6 = $row['title6'];
$title7 = $row['title7'];
$title8 = $row['title8'];
$price1 = $row['price1'];
$price2 = $row['price2'];
$price3 = $row['price3'];
$price4 = $row['price4'];
$price5 = $row['price5'];
$price6 = $row['price6'];
$price7 = $row['price7'];
$price8 = $row['price8'];
$date1 = $row['date1'];
$date2 = $row['date2'];
$date3 = $row['date3'];
$date4 = $row['date4'];
$date5 = $row['date5'];
$date6 = $row['date6'];
$date7 = $row['date7'];
$date8 = $row['date8'];

//this will echo the contents of each db row as they are iterated in the loop

#############################
echo "<form action ='eventreg.php' method='post'>";
echo "<center><table border='1' width='600'>";


if (!empty($title1)) { echo "<tr><td width='100'> <input type='checkbox' name='subevent1' value='$title1'/></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> "; }
if (!empty($title2)) { echo "<br/><tr><td> <input type='checkbox' name='subevent2' value='$title2' /></td><td><strong>$title2 </strong><br /> $date2 <br />$ $price2 </tr></td>" ; }

if (!empty($title3)) { echo "<br/><tr><td><input type='checkbox' name='subevent3' value='$title3' /></td><td><strong>$title3</strong> <br /> $date3 <br />$ $price3</tr></td>"; }

if (!empty($title4)) { echo "<br/><tr><td><input type='checkbox' name='subevent4' value='$title4' /></td><td><strong>$title4</strong> <br /> $date4 <br />$ $price4</tr></td>"; }

if (!empty($title5)) { echo "<br/><tr><td><input type='checkbox' name='subevent5' value='$title5' /></td><td><strong>$title5</strong> <br /> $date5 <br />$ $price5</tr>"; }

if (!empty($title6)) { echo "<br/><tr><td> <input type='checkbox' name='subevent6' value='$title6' /></td><td><strong>$title6 </strong><br /> $date6 <br />$ $price6</tr></td>"; }

if (!empty($title7)) { echo "<br/><tr><td> <input type='checkbox' name='subevent7' value='$title7' /></td><td><strong>$title7</strong> <br /> $date7 <br />$ $price7</tr></td>"; }

if (!empty($title8)) { echo "<br/><tr><td> <input type='checkbox' name='subevent8' value='$title8' /></td><td><strong>$title8</strong> <br /> $date8 <br />$ $price8</tr></td>"; }
echo "</table>";
echo "<input name='userid' type=\"hidden\" value=\"$userid\" />";
echo "<input name='eventid' type=\"hidden\" value=\"$eventid\" />";
echo "<input name='event' type=\"hidden\" value=\"$event\" />";
echo "<input name='name' type=\"hidden\" value=\"$name\" />";
echo "<input name=\"save\" type=\"submit\" value=\"Register Now!\" />";

echo "</center></form>";
}
//etc etc

?>

Link to comment
https://forums.phpfreaks.com/topic/232611-disable-register/
Share on other sites

Search the "Events" table for their username. If it returns any results, output an error. Like so:

 

<?php

//Search 'events' table for the username
//I don't know where you're storing username, but I've assumed It's defined as $username

$sql = "SELECT * FROM `events` WHERE userid = '$username'";
$res = mysql_query($sql) or die(mysql_error());
$num = mysql_num_rows($res);

if($num > 0) {

//If it finds a match, output an error message
echo "Sorry, you've already registered for this event.";

} else {

//Sign up for the event

}

?>

Link to comment
https://forums.phpfreaks.com/topic/232611-disable-register/#findComment-1196451
Share on other sites

ok I came up with this:

if($num>0){
echo "<tr><td width='300'> You have already registered for this event</td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title1)) { echo "<tr><td width='100'> <input type='checkbox' name='title1' value='$title1'/></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> "; }
if($num>0){
echo "<tr><td width='100'> You have already registered for this event</td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title2)) { echo "<br/><tr><td> <input type='checkbox' name='title2' value='$title2' /></td><td><strong>$title2 </strong><br /> $date2 <br />$ $price2 </tr></td>" ; }

 

but this will make it so that if it is present in any subevent, it wont work........so how do I make it subevent specific........$num is defined before, just not shown....

Link to comment
https://forums.phpfreaks.com/topic/232611-disable-register/#findComment-1199531
Share on other sites

alright......maybe this is kinda close? or maybe not.......maybe inspire someone?

<?php

//Search 'events' table for the username
//I don't know where you're storing username, but I've assumed It's defined as $username

$sql = "SELECT * FROM `Events` WHERE eventid = '".$_GET['eventid']."'";
$res = mysql_query($sql) or die(mysql_error());
$num = mysql_num_rows($res);
?>
<?php

$sql = mysql_query("SELECT * FROM Registration WHERE eventid=".$_GET['eventid']." LIMIT 1");
while($row = mysql_fetch_array($sql)){
    $eventid = $row["eventid"];
$event = $row["event"];
$startdate = $row["startdate"];
$enddate = $row["enddate"];
$description = $row["description"];
$location = $row["location"];
$title1 = $row['title1'];
$title2 = $row['title2'];
$title3 = $row['title3'];
$title4 = $row['title4'];
$title5 = $row['title5'];
$title6 = $row['title6'];
$title7 = $row['title7'];
$title8 = $row['title8'];
$price1 = $row['price1'];
$price2 = $row['price2'];
$price3 = $row['price3'];
$price4 = $row['price4'];
$price5 = $row['price5'];
$price6 = $row['price6'];
$price7 = $row['price7'];
$price8 = $row['price8'];
$date1 = $row['date1'];
$date2 = $row['date2'];
$date3 = $row['date3'];
$date4 = $row['date4'];
$date5 = $row['date5'];
$date6 = $row['date6'];
$date7 = $row['date7'];
$date8 = $row['date8'];

//this will echo the contents of each db row as they are iterated in the loop

#############################
echo "<form action ='eventreg.php' method='post'>";
echo "<center><table border='1' width='600'>";

if ($al){
    echo "<tr><td width='300'><strong><font color='red'> You have already registered for this event</font></strong></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title1)) { echo "<tr><td width='300'> <input type='checkbox' name='title1' value='$title1'/></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> "; }
if ($num['title2'] > 0 ){    echo "<tr><td width='100'> <strong><font color='red'> You have already registered for this event</font></strong></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title2)) { echo "<br/><tr><td> <input type='checkbox' name='title2' value='$title2' /></td><td><strong>$title2 </strong><br /> $date2 <br />$ $price2 </tr></td>" ; }

if ($num['title3'] > 0 ){    echo "<tr><td width='100'> <strong><font color='red'> You have already registered for this event</font></strong></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title3)) { echo "<br/><tr><td><input type='checkbox' name='title3' value='$title3' /></td><td><strong>$title3</strong> <br /> $date3 <br />$ $price3</tr></td>"; }

if ($num['title4'] > 0 ){    echo "<tr><td width='100'><strong><font color='red'> You have already registered for this event</font></strong></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title4)) { echo "<br/><tr><td><input type='checkbox' name='title4' value='$title4' /></td><td><strong>$title4</strong> <br /> $date4 <br />$ $price4</tr></td>"; }

if ($num['title5'] > 0 ){    echo "<tr><td width='100'> <strong><font color='red'> You have already registered for this event</font></strong></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title5)) { echo "<br/><tr><td><input type='checkbox' name='title5' value='$title5' /></td><td><strong>$title5</strong> <br /> $date5 <br />$ $price5</tr>"; }

if ($num['title6'] > 0 ){    echo "<tr><td width='100'> <strong><font color='red'> You have already registered for this event</font></strong></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title6)) { echo "<br/><tr><td> <input type='checkbox' name='title6' value='$title6' /></td><td><strong>$title6 </strong><br /> $date6 <br />$ $price6</tr></td>"; }

if ($num['title7'] > 0 ){    echo "<tr><td width='100'> <strong><font color='red'> You have already registered for this event</font></strong></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title7)) { echo "<br/><tr><td> <input type='checkbox' name='title7' value='$title7' /></td><td><strong>$title7</strong> <br /> $date7 <br />$ $price7</tr></td>"; }

if ($num['title8'] > 0 ){    echo "<tr><td width='100'> <strong><font color='red'> You have already registered for this event</font></strong></td><td width='500'><strong>$title1 </strong><br /> $date1 <br />$ $price1 </tr></td> ";} else if (!empty($title8)) { echo "<br/><tr><td> <input type='checkbox' name='title8' value='$title8' /></td><td><strong>$title8</strong> <br /> $date8 <br />$ $price8</tr></td>"; }
echo "</table>";
echo "<input name='userid' type=\"hidden\" value=\"$userid\" />";
echo "<input name='eventid' type=\"hidden\" value=\"$eventid\" />";
echo "<input name='email' type=\"text\" value=\"$email\" />";
echo "<input name='event' type=\"hidden\" value=\"$event\" />";
echo "<input name='name' type=\"hidden\" value=\"$name\" />";
echo "<input name=\"save\" type=\"submit\" value=\"Register Now!\" />";
echo "<input name='price1' type=\"hidden\" value=\"$price1\" />";
echo "<input name='price2' type=\"hidden\" value=\"$price2\" />";
echo "<input name='price3' type=\"hidden\" value=\"$price3\" />";
echo "<input name='price4' type=\"hidden\" value=\"$price4\" />";
echo "<input name='price5' type=\"hidden\" value=\"$price5\" />";
echo "<input name='price6' type=\"hidden\" value=\"$price6\" />";
echo "<input name='price7' type=\"hidden\" value=\"$price7\" />";
echo "<input name='price8' type=\"hidden\" value=\"$price8\" />";

echo "</center></form>";
}
//etc etc

//If it finds a match, output an error message
     
?>

 

Link to comment
https://forums.phpfreaks.com/topic/232611-disable-register/#findComment-1199685
Share on other sites

  • 2 weeks later...

ok, next problem is how do I make it so the confirmation email would only send once so like if you go forward a page then go back, it won't resend the email?

 

		// Change this to your site admin email
	$from = "[email protected]";
	$subject = "Thank You for Registering for $event. ";




	//Begin HTML Email Message where you need to change the activation URL inside

	$message = "<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<title>Untitled Document</title>
<style type='text/css'>
#apDiv1 {
position:absolute;
left:338px;
top:278px;
width:311px;
height:129px;
z-index:1;
}
#apDiv2 {
position:absolute;
left:165px;
top:133px;
width:181px;
height:149px;
z-index:2;
}
#apDiv2 {
text-align: center;
}
body {
background-repeat: no-repeat;
text-align: right;
}

</style>
</head>

<body>
<table width='749' height='546' border='0' cellpadding='0' cellspacing='0' background='http://final.net46.net/buttons/boyscout.jpg'>
  
  <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
   <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
  <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th width='200' scope='col'> $name <br />
<br />
<a href='index.php' target='_new'><strong>Troop 78 Home</strong></a><strong><br />
<br />
<a href='http://www.cornhuskercouncil.org'>Cornhusker Council</a></strong></th>
    <th width='200' scope='col'> </th>
    <th scope='col'>  <table width='408' border='1' cellspacing='2' cellpadding='2'>
    <tr>
      <th width='90' scope='col'>Event(s):</th>
      <th width='298' scope='col'>";
  ?>
    <?php
      $sql = ("SELECT * FROM Events WHERE eventid='$eventid' && userid='$userid'");
$result = mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_array($result)){
$event = $row['event'];
$startdate = $row['startdate'];
$enddate = $row['enddate'];
$description = $row['description'];
$location = $row['location'];
$subevent1 = $row['subevent1'];
$subevent2 = $row['subevent2'];
$subevent3 = $row['subevent3'];
$subevent4 = $row['subevent4'];
$subevent5 = $row['subevent5'];
$subevent6 = $row['subevent6'];
$subevent7 = $row['subevent7'];
$subevent8 = $row['subevent8'];
}

if (!empty($title1)) { $message .= "<br/>$title1"; }
if (!empty($title2)) { $message .= "<hr><br/>$title2" ; }
if (!empty($title3)) { $message .= "<hr><br/>$title3"; }
if (!empty($title4)) { $message .= "<hr><br/>$title4"; }
if (!empty($title5)) { $message .= "<hr><br/>$title5"; }
if (!empty($title6)) { $message .= "<hr> <br/>$title6"; }
if (!empty($title7)) { $message .= "<hr><br/>$title7"; }
if (!empty($title8)) { $message .= "<hr><br/>$title8"; }
echo "</div>";  
?>
    <?php
$message .="</th>
    </tr>
    <tr>
      <th>Price:</th>
      <th>$ $total

</th>
    </tr>
    <tr>
      <th>Registrant:</th>
      <th> $name</th>
    </tr>
  </table>
</div></th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    
  </tr>
  <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
  <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
  <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
  <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
  <tr>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
    <th scope='col'> </th>
  </tr>
</table>

</body>
</html>";

	// end of message
	$headers = "From: $from\r\n";
	$headers .= "Content-Type: text/html\r\n";
	$to = "$to";
	// Finally send the activation email to the member
	mail($to, $subject, $message, $headers);

Link to comment
https://forums.phpfreaks.com/topic/232611-disable-register/#findComment-1204462
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.