Jump to content

searls03

Members
  • Posts

    907
  • Joined

  • Last visited

Everything posted by searls03

  1. no didnt work........this is what i want basically: <?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']; $subevent1 = $row['subevent2']; $subevent3 = $row['subevent3']; $subevent4 = $row['subevent4']; $subevent5 = $row['subevent5']; $subevent6 = $row['subevent6']; $subevent7 = $row['subevent7']; $subevent8 = $row['subevent8']; } if (!empty($title1)) { echo "<br/>$title1"; } if (!empty($title2)) { echo "<hr><br/>$title2" ; } if (!empty($title3)) { echo "<hr><br/>$title3"; } if (!empty($title4)) { echo "<hr><br/>$title4"; } if (!empty($title5)) { echo "<hr><br/>$title5"; } if (!empty($title6)) { echo "<hr> <br/>$title6"; } if (!empty($title7)) { echo "<hr><br/>$title7"; } if (!empty($title8)) { echo "<hr><br/>$title8"; } ?>
  2. also, real easy probably, I cant seem to figure out how to display a $ in front of $total: $this->cell(50,10, $total, 1,0);
  3. well, I need to know how to set it up so that it can be echoed?
  4. yep worked, now what about the $events? :confused: :confused: :confused:
  5. i believe if I can get this page to link to /ticket.php?eventid=_______ it will work.........I cant seem to make it get the eventid though: <?php session_start(); // Must start session first thing /* Created By Adam Khoury @ www.flashbuilding.com -----------------------June 20, 2008----------------------- */ // Here we run a login check if (!isset($_SESSION['id'])) { echo 'Please <a href="login.php">log in</a> to access your account'; exit(); } //Connect to the database through our include include_once "connect_to_mysql.php"; // Place Session variable 'id' into local variable $userid = $_SESSION['id']; // Query member data from the database and ready it for display $sql = mysql_query("SELECT * FROM members WHERE userid='$userid' LIMIT 1"); while($row = mysql_fetch_array($sql)){ $name = $row["name"]; $phone = $row["phone"]; $username = $row["username"]; $address = $row["address"]; $city = $row["city"]; $state = $row["state"]; $zip = $row["zip"]; $cell = $row["cell"]; $email = $row["email"]; $accounttype = $row["accounttype"]; $rank = $row["rank"]; $badges = $row["badges"]; } // Query member data from the database and ready it // Process the form if it is submitted // Set error message as blank upon arrival to page $errorMsg = ""; // First we check to see if the form has been submitted if (isset($_POST['eventid'])){ $name = ereg_replace("[^A-Z a-z0-9]", "", $_POST['name']); // filter everything but numbers and letters $event = ereg_replace("[^A-Z a-z0-9]", "", $_POST['event']); // filter everything but spaces, numbers, and letters $eventid = ereg_replace("[^A-Z a-z0-9]", "", $_POST['eventid']); // filter everything but spaces, numbers, and letters $userid = ereg_replace("[^A-Z a-z0-9]", "", $_POST['userid']); $title1 = ereg_replace("[^A-Z a-z0-9]", "", $_POST['title1']); // filter everything but spaces, numbers, and letters $title2 = ereg_replace("[^A-Za-z0-9]", "", $_POST['title2']); // filter everything but lowercase letters $title3 = ereg_replace("[^A-Za-z0-9]", "", $_POST['title3']); // filter everything but lowercase letters $title4 = ereg_replace("[^A-Za-z0-9]", "", $_POST['title4']); // filter everything but lowercase letters $title5 = ereg_replace("[^A-Za-z0-9]", "", $_POST['title5']); // filter everything but lowercase letters $title6 = ereg_replace("[^A-Z a-z0-9]", "", $_POST['title6']); // filter everything but $title7 = ereg_replace("[^A-Z a-z0-9]", "", $_POST['title7']); // filter everything but $title8 = ereg_replace("[^A-Z a-z0-9]", "", $_POST['title8']); // filter everything but $email = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['email']); // filter everything but $id = ereg_replace("[^A-Z a-z0-9.@,]", "", $_POST['id']); if (isset($_POST['title8'])) { $price8 = $_POST['price8']; } else { $price8 = ""; } if (isset($_POST['title7'])) { $price7 = $_POST['price7']; } else { $price7 = ""; } if (isset($_POST['title6'])) { $price6 = $_POST['price6']; } else { $price6 = ""; } if (isset($_POST['title5'])) { $price5 = $_POST['price5']; } else { $price5 = ""; } if (isset($_POST['title4'])) { $price4 = $_POST['price4']; } else { $price4 = ""; } if (isset($_POST['title3'])) { $price3 = $_POST['price3']; } else { $price3 = ""; } if (isset($_POST['title2'])) { $price2 = $_POST['price2']; } else { $price2 = ""; } if (isset($_POST['title1'])) { $price1 = $_POST['price1']; } else { $price1 = ""; } // filter everything but $sql = "REPLACE INTO Events (name, event, eventid, userid, title1, title2, title3, title4, title5, title6, title7, title8, email, id, price1, price2, price3, price4, price5, price6, price7, price8) VALUES('$name','$event','$eventid','$userid','$title1','$title2','$title3','$title4','$title5','$title6','$title7','$title8','$email','$id','$price1', '$price2', '$price3','$price4','$price5','$price6','$price7','$price8')"; $rs = mysql_query($sql) or die ("Problem with the query: $sql<br>" . mysql_error()); $total = $price1 + $price2 + $price3 + $price4 +$price5 + $price6 + $price7 + $price8; ?> <!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>Thank you for Registering</title> <style type="text/css"> #editregion { position:absolute; left:-8px; top:272px; width:1293px; height:354px; z-index:1; text-align: center; clear: none; float: none; } body { background-image: url(button/boyscout1.png); background-repeat: no-repeat; position: relative; } #menu { position:relative; left:160px; top:0px; width:931px; height:59px; z-index:19; } #menu #MenuBar1 li a { color: #000; border-top-style: outset; border-right-style: outset; border-bottom-style: outset; border-left-style: outset; width: 100px; } #status { position:relative; left:16px; top:180px; width:124px; height:44px; z-index:14; } </style> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <script type="text/javascript"> function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } </script> <style type="text/css"> #apDiv1 { position:absolute; left:260px; top:89px; width:229px; height:75px; z-index:21; } </style> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> #logout { position:relative; left:0px; top:0pxpx; width:134px; height:38px; z-index:20; font-weight: bold; font-size: 24px; } #logout a { color: #000; } #status { text-align: center; } #logout1 { position:absolute; left:1071px; top:191px; width:224px; height:61px; z-index:2; } #menu2 { position:absolute; left:-1px; top:172px; width:497px; height:92px; z-index:20; } #footer { position:fixed; left:-10px; top:0px2 width:1290px; height:63px; z-index:300; color: #000; background-color: #000; right: 0px; bottom: 0px; } #editregion p { text-align: left; } </style> </head> <body> <div id="menu2"><div id="menu"> <ul id="MenuBar1" class="MenuBarHorizontal"> <li><a href="myprofile.php">My Profile</a> </li> <li><a href="register.php">Register</a></li> <li><a href="projects.php">Projects</a> </li> <li><a href="news.php">News</a></li> <?php if ($accounttype == "Admin") { ?> <li><a href="membermanager.php">Scout Manager</a></li> <li><a href="eventmanager.php">Event Manager</a></li> <li><a href="newsmanager.php">News Manager</a></li> </ul><?php } ?> </div></div> <div id="logout1"><div id="logout"><a href="logout.php">Logout</a></div></div> <div id="status"><?php echo "$accounttype"; ?> <br /><?php echo "$name"; ?> <p> </p> </div> <div id="editregion"> <p> Thank you for registering for <?php echo $event; ?>. We have sent an email to your inbox at <?php echo $email; ?>. If you do not recieve this email, please check your spam folder and add "events@final.net46.net" to your address book to ensure you will recieve all confirmations in the future. Please click the file below to print your ticket and please bring it to the next scout meeting. If you cannot print, please email "<a href="mailto:searls03@gmail.com">searls03@troop078.net46.net</a>" to let him know you have registered. Thanks. <a href="ticket.php">Ticket</a> <p> <p> <div id="apDiv1"> <table width="453" border="1" cellspacing="2" cellpadding="2"> <tr> <th width="167" scope="col">Events:</th> <td width="266" 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']; $subevent1 = $row['subevent2']; $subevent3 = $row['subevent3']; $subevent4 = $row['subevent4']; $subevent5 = $row['subevent5']; $subevent6 = $row['subevent6']; $subevent7 = $row['subevent7']; $subevent8 = $row['subevent8']; } if (!empty($title1)) { echo "<br/>$title1"; } if (!empty($title2)) { echo "<hr><br/>$title2" ; } if (!empty($title3)) { echo "<hr><br/>$title3"; } if (!empty($title4)) { echo "<hr><br/>$title4"; } if (!empty($title5)) { echo "<hr><br/>$title5"; } if (!empty($title6)) { echo "<hr> <br/>$title6"; } if (!empty($title7)) { echo "<hr><br/>$title7"; } if (!empty($title8)) { echo "<hr><br/>$title8"; } ?> </td> </tr> <tr> <th>Price:</th> <td><?php echo $total; ?></td> </tr> <tr> <th>Registrant:</th> <td><?php echo $name; ?></td> </tr> </table> </div> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> <?php if ($accounttype == "Admin") {echo '<div id="footer"><img src="footer_admin.png" width="1290" height="63" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="rect" coords="10,5,112,32" href="myprofile.php" /> <area shape="rect" coords="153,5,235,31" href="register.php" /> <area shape="rect" coords="277,7,333,32" href="news.php" /> <area shape="rect" coords="471,7,682,33" href="scoutmanager.php" /> <area shape="rect" coords="726,5,874,34" href="membermanager.php" /> <area shape="rect" coords="906,3,1058,34" href="eventmanager.php" /> <area shape="rect" coords="1092,6,1226,32" href="newsmanager.php" /> </map> </div>'; } else if ($accounttyp="scout"){echo '<div id="footer"><img src="footer_scout.png" width="1290" height="63" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="rect" coords="526,6,632,34" href="myprofile.php" /> <area shape="rect" coords="668,5,752,32" href="register.php" /> <area shape="rect" coords="789,5,850,34" href="news.php" /> </map> </div>';} else {echo '<div id="footer"><img src="footer_admin.png" width="1290" height="63" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="rect" coords="10,5,112,32" href="myprofile.php" /> <area shape="rect" coords="153,5,235,31" href="register.php" /> <area shape="rect" coords="277,7,333,32" href="news.php" /> <area shape="rect" coords="471,7,682,33" href="scoutmanager.php" /> <area shape="rect" coords="726,5,874,34" href="membermanager.php" /> <area shape="rect" coords="906,3,1058,34" href="eventmanager.php" /> <area shape="rect" coords="1092,6,1226,32" href="newsmanager.php" /> </map> </div>'; } ?> <?php $to = "$email"; // Change this to your site admin email $from = "events@final.net46.net"; $subject = "Thank You for Registering for $event. "; </body> </html> PS. if I put in a textfield and value is set as $eventid.........it displays correct id..........cant seem to make it link to it though...............right after body begins.
  6. ok, so for the total I have: <?php session_start(); // Must start session first thing /* Created By Adam Khoury @ www.flashbuilding.com -----------------------June 20, 2008----------------------- */ // Here we run a login check if (!isset($_SESSION['id'])) { echo 'Please <a href="login.php">log in</a> to access your account'; exit(); } //Connect to the database through our include include_once "connect_to_mysql.php"; // Place Session variable 'id' into local variable $userid = $_SESSION['id']; // Query member data from the database and ready it for display $sql = mysql_query("SELECT * FROM members WHERE userid='$userid' LIMIT 1"); while($row = mysql_fetch_array($sql)){ $name = $row['name']; $phone = $row["phone"]; $username = $row["username"]; $address = $row["address"]; $city = $row["city"]; $state = $row["state"]; $zip = $row["zip"]; $cell = $row["cell"]; $email = $row["email"]; $accounttype = $row["accounttype"]; $rank = $row["rank"]; $badges = $row["badges"]; } $sql = mysql_query("SELECT * FROM Events WHERE userid='$userid' && eventid='$eventid'"); while($row = mysql_fetch_array($sql)){ $price1 = $row['price1']; $price2 = $row["price2"]; $price3 = $row["price3"]; $price4 = $row["price4"]; $price5 = $row["price5"]; $price6 = $row["price6"]; $price7 = $row["price7"]; $price8 = $row["price8"]; } $total = $price1 + $price2 + $price3 + $price4 +$price5 + $price6 + $price7 + $price8; require('fpdf.php'); class PDF extends FPDF { //Page header function Header() { global $name; global $total; // get the variable $name1 into the scope of this function //Logo //Arial bold 15 $this->SetFont('Arial','B',15); //Move to the right $this->Cell(70); //Title $this->Cell(0,0,'Please bring this to the next Scout Meeting',0,0,C); //Line break $this->Ln(20); $this->Cell(0,0,'',1,0); $this->Ln(20); $this->cell(50,10, 'Registrant:', 1,0); $this->cell(50,10, 'Events:', 1,0); $this->cell(50,10, 'Price:', 1,0); $this->Ln(10); $this->cell(50,10,$name, 1,0); $this->cell(50,10, $events, 1,0); $this->cell(50,10, $total, 1,0); } //Page footer function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',; //Page number $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); } } //Instanciation of inherited class $pdf=new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Times','',12); $pdf->Output('ticket.pdf', 'I'); ?> but it keeps on displaying zero when it should display 64 because 8 events are registered and are $8 each. I want to use userid and eventid from previous page to gather the info. I am confused on this...........sorry
  7. the thing that I want to have for $events?
  8. ok, so i have looked at the manual and cant seem to find how I would echo an addition function that was executed and how I can apply this to the page: <?php session_start(); // Must start session first thing /* Created By Adam Khoury @ www.flashbuilding.com -----------------------June 20, 2008----------------------- */ // Here we run a login check if (!isset($_SESSION['id'])) { echo 'Please <a href="login.php">log in</a> to access your account'; exit(); } //Connect to the database through our include include_once "connect_to_mysql.php"; // Place Session variable 'id' into local variable $userid = $_SESSION['id']; // Query member data from the database and ready it for display $sql = mysql_query("SELECT * FROM members WHERE userid='$userid' LIMIT 1"); while($row = mysql_fetch_array($sql)){ $name = $row['name']; $phone = $row["phone"]; $username = $row["username"]; $address = $row["address"]; $city = $row["city"]; $state = $row["state"]; $zip = $row["zip"]; $cell = $row["cell"]; $email = $row["email"]; $accounttype = $row["accounttype"]; $rank = $row["rank"]; $badges = $row["badges"]; } $name1 = '$name'; require('fpdf.php'); class PDF extends FPDF { //Page header function Header() { global $name; global $total; // get the variable $name1 into the scope of this function //Logo //Arial bold 15 $this->SetFont('Arial','B',15); //Move to the right $this->Cell(70); //Title $this->Cell(0,0,'Please bring this to the next Scout Meeting',0,0,C); //Line break $this->Ln(20); $this->Cell(0,0,'',1,0); $this->Ln(20); $this->cell(50,10, 'Registrant:', 1,0); $this->cell(50,10, 'Events:', 1,0); $this->cell(50,10, 'Price:', 1,0); $this->Ln(10); $this->cell(50,10,$name, 1,0); $this->cell(50,10, $events, 1,0); $this->cell(50,10, $total, 1,0); } //Page footer function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',; //Page number $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); } } //Instanciation of inherited class $pdf=new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Times','',12); $pdf->Output('ticket.pdf', 'I'); ?> <!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> </head> <body> </body> </html> here is the $total:(from previous page) $total = $price1 + $price2 + $price3 + $price4 +$price5 + $price6 + $price7 + $price8; and here is what I want for $events(from previous page): <?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']; $subevent1 = $row['subevent2']; $subevent3 = $row['subevent3']; $subevent4 = $row['subevent4']; $subevent5 = $row['subevent5']; $subevent6 = $row['subevent6']; $subevent7 = $row['subevent7']; $subevent8 = $row['subevent8']; } if (!empty($title1)) { echo "<br/>$title1"; } if (!empty($title2)) { echo "<hr><br/>$title2" ; } if (!empty($title3)) { echo "<hr><br/>$title3"; } if (!empty($title4)) { echo "<hr><br/>$title4"; } if (!empty($title5)) { echo "<hr><br/>$title5"; } if (!empty($title6)) { echo "<hr> <br/>$title6"; } if (!empty($title7)) { echo "<hr><br/>$title7"; } if (!empty($title8)) { echo "<hr><br/>$title8"; } ?> can you help me with this? I am not good with the strings from previous pages.................
  9. ok, so I am trying to make it echo $name, but it doesn't seem to be working: <?php session_start(); // Must start session first thing /* Created By Adam Khoury @ www.flashbuilding.com -----------------------June 20, 2008----------------------- */ // Here we run a login check if (!isset($_SESSION['id'])) { echo 'Please <a href="login.php">log in</a> to access your account'; exit(); } //Connect to the database through our include include_once "connect_to_mysql.php"; // Place Session variable 'id' into local variable $userid = $_SESSION['id']; // Query member data from the database and ready it for display $sql = mysql_query("SELECT * FROM members WHERE userid='$userid' LIMIT 1"); while($row = mysql_fetch_array($sql)){ $name = $row['name']; $phone = $row["phone"]; $username = $row["username"]; $address = $row["address"]; $city = $row["city"]; $state = $row["state"]; $zip = $row["zip"]; $cell = $row["cell"]; $email = $row["email"]; $accounttype = $row["accounttype"]; $rank = $row["rank"]; $badges = $row["badges"]; } $name1 = '$name'; require('fpdf.php'); class PDF extends FPDF { //Page header function Header() { //Logo //Arial bold 15 $this->SetFont('Arial','B',15); //Move to the right $this->Cell(70); //Title $this->Cell(0,0,'Please bring this to the next Scout Meeting',0,0,C); //Line break $this->Ln(20); $this->Cell(0,0,'',1,0); $this->Ln(20); $this->cell(100,20, 'Registrant:', 1,0); $this->cell(10,20, $name1, 1,0); } //Page footer function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',; //Page number $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); } } //Instanciation of inherited class $pdf=new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Times','',12); $pdf->Output(); ?> <!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> </head> <body> </body> </html> And yes, the session id isset..................how can I make it pull it from the previous page where the link is? do you know......I can't seem to find this on the site?
  10. yep, i realized that. haha..........how can I put different borders around text?
  11. is there a way I can do it with having data already being there and it is a download link like the website kindof shows?
  12. is there a way I can make something like a ticket in pdf format that can have $name or the likes echo in it? if you could help get me started, that would be great!
  13. still not.............the table is being displayed above the image: $to = "$email"; // Change this to your site admin email $from = "events@final.net46.net"; $subject = "Thank You for Registering for $event. "; //Begin HTML Email Message where you need to change the activation URL inside $message = "<html> <head> <style type='text/css'> #apDiv1 { position:absolute; left:338px; top:278px; width:311px; height:129px; z-index:1; } #pic { position:relative; left:0px; top:0px; } #apDiv2 { position:absolute; left:50px; top:207px; width:181px; height:149px; z-index:2; } #apDiv2 { text-align: center; } body { background-image: url(final.net46.net/button/boyscout.jpg); background-repeat: no-repeat; } </style> </head> <body><div id='apDiv1'> <table width='408' border='1' cellspacing='2' cellpadding='2'> <tr> <th width='90' scope='col'>Event(s):</th> <th width='298' scope='col'>"; $sql = ("SELECT * FROM Events WHERE eventid='$eventid'"); $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>"; ?> <?php $message .=" <tr> <th>Registrant:</th> <th> $name </th> </tr> </table>"; ?> <?php $message .=" <div id='pic'> <img src=\"http://final.net46.net/button/boyscout.jpg\"> <div id='apDiv2'>$name <p> </p> <p> </p> <p><a href='final.net46.net' target='_new'><strong>Troop 78 Home</strong></a></p> <p> </p> <p> </p> <p><strong><a href='http://www.cornhuskercouncil.org'>Cornhusker Council</a></strong></p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> </div> </body> </html>"; ?> <?php // 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);
  14. OK, so I have a mail function code: $to = "$email"; // Change this to your site admin email $from = "events@final.net46.net"; $subject = "Thank You for Registering for $event. "; //Begin HTML Email Message where you need to change the activation URL inside $message = "<html> <head> <style type='text/css'> #apDiv1 { position:absolute; left:338px; top:278px; width:311px; height:129px; z-index:1; } #pic { position:relative; left:0px; top:0px; } #apDiv2 { position:absolute; left:50px; top:207px; width:181px; height:149px; z-index:2; } #apDiv2 { text-align: center; } </style> </head> <body><div id='apDiv1'> <table width='408' border='1' cellspacing='2' cellpadding='2'> <tr> <th width='90' scope='col'>Event(s):</th> <th width='298' scope='col'>"; $sql = ("SELECT * FROM Events WHERE eventid='$eventid'"); $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>"; ?> <?php $message .=" <tr> <th>Registrant:</th> <th> $name </th> </tr> </table>"; ?> <?php $message .=" <div id='pic'> <img src=\"http://final.net46.net/button/boyscout.jpg\"> <div id='apDiv2'>$name <p> </p> <p> </p> <p><a href='final.net46.net' target='_new'><strong>Troop 78 Home</strong></a></p> <p> </p> <p> </p> <p><strong><a href='http://www.cornhuskercouncil.org'>Cornhusker Council</a></strong></p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> </div> </body> </html>"; ?> <?php // 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); I would like this image <img src=\"http://final.net46.net/button/boyscout.jpg\"> to be the background.............and everything else is layered on top of that.........how can I do this?
  15. so should I put that with this code or in the processing piece of the code? and if it is with this, can you help get me started? if (isset($_POST['eventid'])){ $name = ereg_replace("[^A-Z a-z0-9]", "", $_POST['name']); // filter everything but numbers and letters $event = ereg_replace("[^A-Z a-z0-9]", "", $_POST['event']); // filter everything but spaces, numbers, and letters $eventid = ereg_replace("[^A-Z a-z0-9]", "", $_POST['eventid']); // filter everything but spaces, numbers, and letters $userid = ereg_replace("[^A-Z a-z0-9]", "", $_POST['userid']); $title1 = ereg_replace("[^A-Z a-z0-9]", "", $_POST['title1']); // filter everything but spaces, numbers, and letters $title2 = ereg_replace("[^A-Za-z0-9]", "", $_POST['title2']); // filter everything but lowercase letters $title3 = ereg_replace("[^A-Za-z0-9]", "", $_POST['title3']); // filter everything but lowercase letters $title4 = ereg_replace("[^A-Za-z0-9]", "", $_POST['title4']); // filter everything but lowercase letters $title5 = ereg_replace("[^A-Za-z0-9]", "", $_POST['title5']); // filter everything but lowercase letters $title6 = ereg_replace("[^A-Z a-z0-9]", "", $_POST['title6']); // filter everything but $title7 = ereg_replace("[^A-Z a-z0-9]", "", $_POST['title7']); // filter everything but $title8 = ereg_replace("[^A-Z a-z0-9]", "", $_POST['title8']); // filter everything but $email = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['email']); // filter everything but $price1 = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['price1']); // filter everything but $price2 = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['price2']); // filter everything but $price3 = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['price3']); // filter everything but $price4 = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['price4']); // filter everything but $price5 = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['price5']); // filter everything but $price6 = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['price6']); // filter everything but $price7 = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['price7']); // filter everything but $price8 = ereg_replace("[^A-Z a-z0-9.@]", "", $_POST['price8']); // filter everything but $id = ereg_replace("[^A-Z a-z0-9.@,]", "", $_POST['id']); // filter everything but $sql = "REPLACE INTO Events (name, event, eventid, userid, title1, title2, title3, title4, title5, title6, title7, title8, email, id, price1, price2, price3, price4, price5, price6, price7, price8) VALUES('$name','$event','$eventid','$userid','$title1','$title2','$title3','$title4','$title5','$title6','$title7','$title8','$email','$id','$price1', '$price2', '$price3','$price4','$price5','$price6','$price7','$price8')"; $rs = mysql_query($sql) or die ("Problem with the query: $sql<br>" . mysql_error());
  16. so I have this code: <input type='checkbox' name='title8' value='$title8' /></td><td><strong>$title8</strong> <br /> $date8 <br />$ $price8<input type='hidden' name='price8' value='$price8'> how do I make is so that the hidden field is only going to submit if the checkbox is checked........
  17. ok, so I need to know how I can perform an operation of $total equaling $price1 + $price2 etc.... if they are not empty in the database............... does this make sense?
  18. how do I set up a table so that there are no indexes yet a replace into can occur?
  19. where do i put where userid='$userid'?
  20. alright, is this the correct format for a REPLACE INTO? if not what do i need to change.......it isn't working...... $sql = "REPLACE INTO Events (name, event, eventid, userid, title1, title2, title3, title4, title5, title6, title7, title8, email) VALUES('$name','$event','$eventid','$userid','$title1','$title2','$title3','$title4','$title5','$title6','$title7','$title8', '$email')"; $rs = mysql_query($sql) or die ("Problem with the query: $sql<br>" . mysql_error());
  21. so basically like an if is checked type of statement?
×
×
  • 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.