Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. There should be no reason for it to be blank. Is it COMPLETELY blank, or do you at least see the text on the top of the page that says "VIEW CANDIDATES"? Try adding this to the top of your script error_reporting(E_ALL);
  2. You need to use the function nl2br() when displaying it.
  3. You need to use double quotes $date = date("$month 1 Y");
  4. If you use $_SERVER['PHP_SELF'] the source code should be fine. I think register_globals has to be enabled in order for just $PHP_SELF to work. It's bad practice to use that anyways.
  5. Change $result=mysql_query($sql); To $result=mysql_query($sql)or die(mysql_error() ."<p>With Query: $sql");
  6. Try using $_SERVER['PHP_SELF']. If that doesn't work, try manually putting the URL in for the action just to see if it works.
  7. That shouldn't be the problem. Are you sending a header? $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; Then your mail function should look something like mail($to, $subject, $message, $headers);
  8. Try using implode() $sql = "SELECT * FROM prod_list WHERE name LIKE '%$search%' OR short_desc LIKE '%$search%' OR description LIKE '%$search%' AND access_levels LIKE '%$user_level%' AND cat_id IN (". implode(',', $items) .") ORDER BY {$orderby} {$ordermeth} LIMIT {$startRange},{$endRange}";
  9. So what's the problem with the output, how do you WANT it to be? The output makes sense to me if your only checking one checkbox. Is that what your doing?
  10. Okay, lets try this. Erase this echo "<ol>\n"; foreach($_POST as $field => $value) { echo "<li>$field = $value</li>\n"; } echo "</ol>\n"; and put in echo '<pre>',print_r($_POST),'</pre>'; Copy and paste what that gives you.
  11. Try chaning foreach($_POST as $field => $value) To foreach($_POST['category'] as $field => $value)
  12. Because you set it up to be an array in your form. After the submit button is pressed, do this to see what the array contains echo '<pre>',print_r($_POST['category']),'</pre>';
  13. if (strlen($string) > 16){ echo "ERROR"; }
  14. I'm going to assume that the customer's name is a unique field in your customer table, if not...you should use the auto incremented ID for the URL. Here is how you would make it a link: echo $row['orderID']. " <a href='customer.php?name={$row['customerName']}'>{$row['customerName']}</a> " . $row['customerEmail']. " " . $row['tableSize']. " " . $row['feltColor']. " " . $row['cupHolders']. " " . $row['chipHolders']. " " . $row['sideRails']. " " . $row['paintColor']. " " . $row['woodFinish']. " " . $row['schoolLogo']. " " . $row['orderTotal']. " " . $row['estimatedCompletion']. " " . $row['completeDate']. " " . $row['deliveryInstructions']. " " . $row['deliveryDate']; I'm just going to call the page the link goes to "customer.php". Now, on the customer.php file, you need to do something like this. //grab their name from the URL $name = $_GET['name']; //do a query selecting their information from DB $query = mysql_query("SELECT fields FROM customer_table WHERE customerName='$name'")or die(mysql_error()); $row = mysql_fetch_assoc($query); //now you can start displaying their information here
  15. You should be getting a syntax error from your query. change it to $result = mysql_query("SELECT f_name FROM gradinfo where email ='a@hotmail.com'")or die(mysql_error()); What's the point of these lines? while($row = mysql_fetch_array($result)) { } Take that out and replace it with $row = mysql_fetch_array($result);
  16. Google should return plenty of tutorials for those.
  17. The "correct" way to do it would be to insert a new row for every different medication they selected. So you would make a new table called something like "user_medications", and it would look something like userID | medicineID ------------------- 1 128 1 12 4 68 That way it just makes it easier to select the information you need. The way your doing it your going to have to select the filed, split up all the medicine ID's, then do a million queries to get specific information on each medication (which I assume is in another table). If you do it the way I described, you can get all the information you need with one query using a join.
  18. Try this <?php $meds = implode(", ", $_POST['medication']); $query = "INSERT INTO table (field_name) VALUES ('$meds')"; $result = mysql_query($query)or die(mysql_error()); ?>
  19. Can you explain exactly what you want to do with the values and the database? Your just going to use a foreach loop. <?php foreach ($_POST['medication'] as $med){ echo $med .'<br>'; } ?>
  20. NOW() is a MySQL function that inserts the current date/time into a datetime field in the database. So they are using it perfectly fine, no need to declare a date variable.
  21. What's the error? My guess to why it's not working is because you have the NOW() function in quotes. Also, your missing a parenthesis from the end. So try this instead $query = "INSERT INTO user_join (user_name, email, invited_by, date_join) VALUES ('$ufull_name', '$uemail', '$rfull_name', NOW())";
  22. Your Welcome Don't forget to press solved.
  23. You need to create an image map. Here is a tutorial http://www.htmlcodetutorial.com/images/images_famsupp_220.html
  24. You are using POST...if you want to get a value from the URL, you need to use GET. So change <?php $ufull_name = $_POST['ufull_name']; echo "ufull_name: ". $ufull_name; echo "<br>ureferer: ". $ureferer; echo "<br>ufname: ". $ufname; echo "<br>ulname: ". $ulname; ?> To <?php $ufull_name = $_GET['ufname']; echo "ufull_name: ". $ufull_name; echo "<br>ureferer: ". $ureferer; echo "<br>ufname: ". $ufname; echo "<br>ulname: ". $ulname; ?>
×
×
  • 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.