Jump to content

searls03

Members
  • Posts

    907
  • Joined

  • Last visited

Everything posted by searls03

  1. or tell me how exactly rows should be linked and how they should link to each other?
  2. do you have any more examples of relations? if not, could you tell me how I could do it so a new column adds please.
  3. well it said to click the relation view button in the tutorial thingy.........can't find it though.........
  4. I can't find the relation view button. v. 2.11.4.
  5. well I have never made tables relationly, how would i do that? is there a way you can auto add a column?
  6. Is there a way to use php to make an automatic column addition to a table? like if I had a comment form and want to save the replys in a database, I would want a column for each reply, is there a way to make a new column each time someone submits the form?
  7. searls03

    error

    here is code: $query = "SELECT * FROM messages WHERE to ='$name'"; and here is the error I am getting: Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'to ='my_name'' at line 1 Does anyone know what is happening?I think it has something to do with the where statement.
  8. any help anybody? I need this working!!!!!!!!!!!!!!!!
  9. I have been looking around for a good website to help me start a mobile website.......I can't find one though.........does anyone have a good site to start with to make a mobile site?
  10. 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 = "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 = "<!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);
  11. Does anyone how to make those little buttons where you can have the option of downloading a table on a website to a pdf or excel document? does anyone know what I am talking about?
  12. ok, so with the barcode thing, how do I make it so that the 0 at start don't show up and the random number at end doesn't display. will use a form to submit 13 numbers to database that is generated when the form is submitted and then I use those numbers to make the barcode, but I need to get rid of the 5(i believe) randomly generated numbers at beginning and end. does this make sense?
  13. how do I make it so that $message displays on form submit on the same 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']; ?> <?php $message ='Registration has been verified!'; // Process the form if it is submitted if ($_POST['submit']) { $verified = $_POST['verified']; $sql = mysql_query("UPDATE Events SET verified='yes', WHERE barcode='$verified'"); exit(); } // close if post ?> <?php // Query member data from the database and ready it for display $sql = mysql_query("SELECT * FROM members WHERE userid='$userid'"); while($row = mysql_fetch_array($sql)){ $userid = $row["userid"]; $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"]; $password = $row["password"]; $password2 = $row["password2"]; } ?> <!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"><!-- InstanceBegin template="/Templates/template2.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <style type="text/css"> #editregion { position:absolute; left:-8px; top:272px; width:1293px; height:51px; z-index:1; text-align: center; clear: none; float: none; } body { background-image: url(file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/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="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/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> <!-- InstanceBeginEditable name="head" --> <style type="text/css"> body { background-image: url(file:///Macintosh%20HD/Users/aaron/Downloads/memberSystemBasic%204/button/boyscout1.png); background-repeat: no-repeat; } </style> <!-- InstanceEndEditable --> <!-- InstanceParam name="id" type="text" value="apDiv6" --> <link href="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/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:1; color: #000; background-color: #000; right: 0px; bottom: 0px; } </style> </head> <body> <div id="logout1"><div id="logout"><a href="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/logout.php">Logout</a></div></div> <div id="status"><?php echo "$accounttype"; ?> <br /><?php echo "$name"; ?> <p> </p> </div> <div id="editregion"><!-- InstanceBeginEditable name="EditRegion3" --> <p> </p> <form id="form1" name="form1" method="post" action=""> Please enter verification code: <label for="verified"></label> <input type="text" name="verified" id="verified" /> </form> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <!-- InstanceEndEditable --><br /><br /> <?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>'; } ?></div> <div id="menu2"><div id="menu"> <ul id="MenuBar1" class="MenuBarHorizontal"> <li><a href="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/myprofile.php">My Profile</a> </li> <li><a href="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/register.php">Register</a></li> <li><a href="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/projects.php">Projects</a> </li> <li><a href="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/news.php">News</a></li> <?php if ($accounttype == "Admin") { ?> <li><a href="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/membermanager.php">Scout Manager</a></li> <li><a href="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/eventmanager.php">Event Manager</a></li> <li><a href="file:///Macintosh HD/Users/aaron/Downloads/memberSystemBasic 4/newsmanager.php">News Manager</a></li> </ul><?php } ?> </div></div> <script type="text/javascript"> var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"}); </script> </body> <!-- InstanceEnd --></html>
  14. so how do I make this text field do the inpup of the random code thing? echo "<input name='barcode' type=\"text\" value=\" cell(0,10,genRandomString(),0,0,'C');\" />";
  15. ok, i got the events piece figured out.........so how do I make it a random barcode?
  16. and is there a way for just a random barcode for each different ticket?
  17. is this where globals should be? oh and error: Fatal error: Class 'FPDF' not found in /home/a6254834/public_html/ticket.php on line 51 class PDF extends FPDF { function EAN13($x, $y, $barcode, $h=16, $w=.35) { global $name; global $total; global $events; $this->Barcode($x,$y,$barcode,$h,$w,13); }
  18. I figured I could, but I don't want there to be a huge gap if like there is title1 present and title8 present but not 2-7...........does this make sense?
  19. well for one I had no idea where to put what and 2, only the barcode is showing now..........
  20. it works on the previous page............I mainly need to know how I can make that the value of $event..........
  21. pretty sure I messed this up for the barcode can you help: require('fpdf.php'); class PDF_EAN13 extends FPDF { function EAN13($x, $y, $barcode, $h=16, $w=.35) { $this->Barcode($x,$y,$barcode,$h,$w,13); } function UPC_A($x, $y, $barcode, $h=16, $w=.35) { $this->Barcode($x,$y,$barcode,$h,$w,12); } function GetCheckDigit($barcode) { //Compute the check digit $sum=0; for($i=1;$i<=11;$i+=2) $sum+=3*$barcode[$i]; for($i=0;$i<=10;$i+=2) $sum+=$barcode[$i]; $r=$sum%10; if($r>0) $r=10-$r; return $r; } function TestCheckDigit($barcode) { //Test validity of check digit $sum=0; for($i=1;$i<=11;$i+=2) $sum+=3*$barcode[$i]; for($i=0;$i<=10;$i+=2) $sum+=$barcode[$i]; return ($sum+$barcode[12])%10==0; } function Barcode($x, $y, $barcode, $h, $w, $len) { //Padding $barcode=str_pad($barcode,$len-1,'0',STR_PAD_LEFT); if($len==12) $barcode='0'.$barcode; //Add or control the check digit if(strlen($barcode)==12) $barcode.=$this->GetCheckDigit($barcode); elseif(!$this->TestCheckDigit($barcode)) $this->Error('Incorrect check digit'); //Convert digits to bars $codes=array( 'A'=>array( '0'=>'0001101','1'=>'0011001','2'=>'0010011','3'=>'0111101','4'=>'0100011', '5'=>'0110001','6'=>'0101111','7'=>'0111011','8'=>'0110111','9'=>'0001011'), 'B'=>array( '0'=>'0100111','1'=>'0110011','2'=>'0011011','3'=>'0100001','4'=>'0011101', '5'=>'0111001','6'=>'0000101','7'=>'0010001','8'=>'0001001','9'=>'0010111'), 'C'=>array( '0'=>'1110010','1'=>'1100110','2'=>'1101100','3'=>'1000010','4'=>'1011100', '5'=>'1001110','6'=>'1010000','7'=>'1000100','8'=>'1001000','9'=>'1110100') ); $parities=array( '0'=>array('A','A','A','A','A','A'), '1'=>array('A','A','B','A','B','B'), '2'=>array('A','A','B','B','A','B'), '3'=>array('A','A','B','B','B','A'), '4'=>array('A','B','A','A','B','B'), '5'=>array('A','B','B','A','A','B'), '6'=>array('A','B','B','B','A','A'), '7'=>array('A','B','A','B','A','B'), '8'=>array('A','B','A','B','B','A'), '9'=>array('A','B','B','A','B','A') ); $code='101'; $p=$parities[$barcode[0]]; for($i=1;$i<=6;$i++) $code.=$codes[$p[$i-1]][$barcode[$i]]; $code.='01010'; for($i=7;$i<=12;$i++) $code.=$codes['C'][$barcode[$i]]; $code.='101'; //Draw bars for($i=0;$i<strlen($code);$i++) { if($code[$i]=='1') $this->Rect($x+$i*$w,$y,$w,$h,'F'); } //Print text uder barcode $this->SetFont('Arial','',12); $this->Text($x,$y+$h+11/$this->k,substr($barcode,-$len)); } } function genRandomString($length = 100) { $characters = '0123456789abcdefghijklmnopqrstuvwxyz'; $string =''; for ($p = 0; $p < $length; $p++) { $string .= $characters[mt_rand(0, strlen($characters))]; } return $string; } class PDF { //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',12); //Page number $this->Cell(0,10,genRandomString(),0,0,'C');} } //Instanciation of inherited class require('ean13.php'); $pdf=new PDF_EAN13(); $pdf=new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->EAN13(80,40,'123456789012'); $pdf->Output(); $pdf->SetFont('Times','',10); $pdf->Output('ticket.pdf', 'I');
  22. all those subevents should actually say title........still that is not the issue............to see full code, look at first post on page 2.
  23. ok, so with the random code thing.......I am trying to expand my idea a bit...............how could I basically make like a barcode that is associated with the ticket.........this one would need to be stored in database with the event...............just trying to make this so it can't be4 forged too easily............can this be done?
  24. none of the titles come up when it is present in database.......
  25. one last thing............after the $events of course................how can I make it so that a random verification code is put into here: $this->Cell(0,10,' ',0,0,'C'); doesn't need to be in database.............just some random letters and numbers............
×
×
  • 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.