Jump to content

sawade

Members
  • Posts

    181
  • Joined

  • Last visited

    Never

Everything posted by sawade

  1. The ids were fine. The css was trying apply two different styles to the code. So I removed the link and thereby the id was only being applied to one style not two. Presto. Problem solved.
  2. <table name="purgeTable" id="purgeTable" /> remove the / <table name="purgeTable" id="purgeTable"> May not solve the problem, but remember the table element is not empty. You have a closing tag later </table>
  3. image of the problem [attachment deleted by admin]
  4. There is space between two div layers, how ever I have zeroed out the margin and padding on both. And yet there is still space. Why are they not collapsing into each other? <body> <div id="body"> <div id="header"> body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; width: 800px; margin-left: auto; margin-right: auto; line-height: 1.7em; margin-top: 0; } #body { background-color: #EEE8CD; border: medium #3D627F solid; padding-bottom: 0; margin-bottom: 0; } #header { margin-top: 0; padding-top: 0; text-align: left; background: #3D627F url(images/medwww.gif) top right no-repeat; } Thanks.
  5. I was able to fix it - it was actually an HTML fix. Had to remove the a href from the active page <ul id="navlist"> <li id="active">home</li> <li><a href="">Product</a></li> <li><a href="">pg</a></li> <li><a href="">pg</a></li> <li><a href="">pg</a></li> </ul>
  6. Yes. #navigation is declared
  7. Hey, This works on my editor and not online. Any ideas? <ul id="navlist"> <li id="active"><a href="index.html" title="home</a></li> <li><a href="">Product</a></li> <li><a href="" title="">pg</a></li> <li><a href="">pg</a></li> <li><a href="" title="pg</a></li> </ul> #navigation ul { padding-bottom: 5px; padding-top: 5px; padding-left: 0; margin-top: 0; margin-left: 0; background-color: #3D627F; color: white; float: left; width: 100%; line-height: 18px; } #navigation ul li { display: inline; padding-left: 0; padding-right: 0; padding-top: 5px; } #navigation ul li a { padding-left: 10px; padding-right: 10px; padding-bottom: 5px; padding-top: 5px; background-color: #3D627F; color: white; text-decoration: none; float: left; border-right: 1px solid #fff; } #navigation ul li a:hover { background-color: #BCD2EE; color: white; } #navigation #active { background-color: #BCD2EE; font-weight: bold; }
  8. Thanks I will read through that. No, I didn't do anything with it. A co-worker said they had it all set up and to just input the code I gave above into the form.
  9. Have you tried... <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  10. Fatal error: Uncaught Crypt_GPG_Exception: Unknown error getting keys. Please use the 'debug' option when creating the Crypt_GPG object, and file a bug report at http://pear.php.net/bugs/report.php?package=Crypt_GPG in /php/Crypt/GPG.php on line 1406 Exception trace # Function Location 0 Crypt_GPG->getKeys('private key;') /php/Crypt/GPG.php:1406 1 Crypt_GPG->_addKey(Array, true, false, 'secureforms@meds…') /php/Crypt/GPG.php:1228 2 Crypt_GPG->addEncryptKey('private key;') /folder/ in /folder/php/Crypt/GPG.php on line 685 [pre]Now I get this error msg.[/pre]
  11. OH also - for checking code to make sure it is error-proof.... W3C HTML code validator http://validator.w3.org/ W3C CSS code validator http://jigsaw.w3.org/css-validator/ And of course W3School website http://www.w3schools.com/
  12. My experience is it is better to learn xhtml using a plain text editor until you really have the feel for it. Than upgrade to something like Frontpage or Dreamweaver. I also highly recommand Head First HTML with CSS and XHTML published by O'Reilly. Then all you will need is a good desk reference.
  13. [pre]Fatal error: Uncaught PEAR_Exception: GPG binary not found. If you are sure the GPG binary is installed, please specify the location of the GPG binary using the 'binary' driver option. in php/Crypt/GPG.php on line 355 Exception trace # Function Location 0 Crypt_GPG_Engine->__construct(Array) /php/Crypt/GPG.php:355 Crypt_GPG->__construct() formtester.php:664 2 {main} thrown in /php/Crypt/GPG/Engine.php on line 391 Above is the last error I need to debug to get my form fully operational again. This is a new error. The form was working before, and now all of a sudden this error is popping up. I'm afraid I am not very well versed in GPG, a co-worker created the GPG and the PHP code to use it. Below is the code: [/pre] $data = $msg; $gpg = new Crypt_GPG(); $gpg->addEncryptkey('private key'); $encrypted = $gpg->encrypt($data); /* Sends Email */ $mail = Mail::factory('smtp', $smtp); $mail->send($to, $headers, $encrypted) or die('Error accessing SMTP server.'); $mail->send($to, $headers2, $msg) or die('Error accessing SMTP server.');
  14. What about the code do you need to know? It is XHTML strict. It looks like it has a few div layers, some headers, an unorder list and an address. Pretty much this code can be editted anywhere. What do you need?
  15. Perfect. Thank you for the extra set of eyes.
  16. Can we see a code snippet from the php file that is trying to send the email?
  17. [pre]This is the error I am receiving. [10-Aug-2009 15:20:29] PHP Parse error: syntax error, unexpected T_FOREACH in formtester.php on line 462 I recently changed my form from simply echo the data input into the form, now the echo data is formatted into a table. Before the change I had no errors with my code, now I have spent a few days debugging. Here is the code. I use the $history_list and $allergy_list variables in the email msg that is sent, imploding the array was the only way I could get it to reflect properly in the email. Thanks for the help![/pre] $history = $_POST['history']; $history_list = implode(", ",$_POST['history']); $allergy = $_POST['allergy']; $allergy_list = implode(", ",$_POST['allergy']); echo '<tr>'; echo '<th>Medical History:'; echo '</th>'; echo '</td>' . foreach ($history as $key) { echo "$key <br />"; } echo '</td>'; echo '<th>Allergies'; echo '</th>'; echo '</td>' . foreach ($allergy as $key2) { echo "$key2 <br />"; } echo '</td>'; echo '</tr>'; P.S. Please don't say to do this: error_reporting(E_ALL ^ E_NOTICE); I want to fix the script not ignore the errors. Thanks.
  18. Well you need to add in a isset statement as well. Basically, you need to tell the from since it is a self processing php that at open all variables are empty and thats okay, shoe the html. Then when the user clicks submit that the form needs to process. Add an isset statement for the basic html form to show with empty fields. Example: if (isset($_POST['submit'])) { ADD VARIABLES $output_form = false; /* POST Validity - Security */ if($_SERVER['REQUEST_METHOD'] != "POST"){ echo("Unauthorized attempt to access page."); exit; } } else { $output_form = true; } ADD PROCESSING CODE AND VALIDATION CODE if ($output_form == true) { end php code and INPUT FORM <?php } ?> This should point you in the right direction. While you are debugging add this to the very top of the php scripting area. <?php ini_set("display_errors", "1"); error_reporting(E_ALL); session_start(); ?>
  19. You know. Looking over it again. You are missing the {} brackets.
  20. [pre]Here is an example: <?php // VARIABLES $first_name = $_POST[ 'first_name' ]; $middle_name = $_POST[ 'middle_name' ]; $last_name = $_POST[ 'last_name' ]; $phone = $_POST[ 'phone' ]; $email = $_POST[ 'email' ]; #email_confirm = $_POST['emailconfirm']; //CREATE THE VARIABLE // VALIDATE EMAIL ADDRESS if ($email == $email_confirm) { // DATABASE QUERY $query = "insert into club values ( '$id', '$first_name', '$middle_name', '$last_name', '$phone', '$email')"; $results = mysql_query( $query ) or printf( "Query error: %s", mysql_error() ); mysql_close(); else { echo 'Your email address was not confirmed, please try again.'; } ?> <form action="<?php $PHP_SELF; ?>" method="POST" onsubmit="return validate_form(this)"> <table width="361" border="0" cellspacing="0" cellpadding="5"> <tr> <td>First Name *</td> <td><input type="text" name="first_name" /></td> </tr> <tr> <td>Middle Name</td> <td><input type="text" name="middle_name" /></td> </tr> <tr> <td>Last/Family/Surname *</td> <td><input type="text" name="last_name" /></td> </tr> <tr> <td>Phone (xxx-xxx-xxxx)</td> <td><input type="text" name="phone" /></td> </tr> <tr> <td>Email Address *</td> <td><input type="text" name="email" /></td> </tr> <tr> <td>Confirm Email *</td> <td><input type="text" name="emailconfirm" /></td> </tr> </table> <p><br /> <input type="submit" /> </p> </form> My only other concern is that in your current code you don't open the $dbc variable for the mySql. I was thinking you left it off so we don't see it. But do be sure you have it. Also, using this validation you may want to think about adding a few more codes in to make your text fields sticky. So in case the two don't match the user does not have to retype the WHOLE form over again. [/pre]
  21. Since you state who you are sending the email to, you can define it anyway you want. Here is an example. require_once "Mail.php"; $to = "Me <me@email.com>"; $headers["From"] = "Me <me@email.com>"; $headers["Subject"] = "My Email"; $smtp["host"] = "localhost"; $smtp["port"] = "26"; $smtp["auth"] = true; $smtp["username"] = "user@email.com"; $smtp["password"] = "password"; $msg = "This is what I want to say."; // Sends the email $mail = Mail::factory('smtp', $smtp); $mail->send($to, $headers, $msg) or die('Error while processing your submission.');
  22. A simple validation code should do the trick for you. Something along the lines of the following. if ($email == $emailconfirm) { ALLOW QUERY else { echo 'Your email address was not confirmed, please try again.'; }
  23. What it may be is you have extra " quote marks in the 1st line. Here - '".$row['MAINT_ID']."'" Trim it down to '.$row['MAINT_ID'].'" See if that helps.
  24. [pre]Still trying to get this working. I have put together a few codes using pieces of the examples given here and some I have seen elsewhere. This is what I have put together. Are these workable? Radio: <td><em>*</em> Sex:<br /> <input type="radio" name="sex" id="male" value="male" <?php if(!empty($gender)) echo ' checked="checked"'; ?> /><label for="male">M</label> <input type="radio" name="sex" id="female" value="female" <?php if(!empty($gender)) echo ' checked="checked"'; ?> /><label for="female">F</label></td> Checkbox: <td> <input type="checkbox" name="history[]" id="history01" multiple="multiple" value="Hospitalization for illness or injury" <?php if (isset ($_POST['history']) && in_array ("Hospitalization for illness or injury", $_POST['history'])) echo ' checked="checked"'; ?>/> <label for="history01">Hospitalization for illness or injury</label> </td> Dropdown menu: <td><label for="prefix">Prefix</label><br /> <select name="prefix" id="prefix" <?php if(!empty($prefix)) echo ' selected="selected"'; ?>> <option value=""></option> <option value="Mr.">Mr</option> <option value="Miss.">Miss</option> <option value="Mrs.">Mrs</option> <option value="Ms.">Ms</option> </select></td>
  25. Yeah, the company that wants the form is not interested in javascript, they want everything in php. Thanks for the thought though. Would that if statement be input just like the text fields?
×
×
  • 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.