Jump to content

cyberRobot

Moderators
  • Posts

    3,145
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by cyberRobot

  1. To help avoid blacklisting, you could consider using a plain "mailto" link: <a href="mailto:email@address.gov?subject=This is the Subject&body=This is the content of the email.">Email Link</a> This would open the message in the visitor's e-mail client and sent out by them. Note that this solution is geared toward e-mail clients like Microsoft Outlook. You would need to provide an alternative for those using web clients like Yahoo Mail...maybe a copy/paste solution. You could create a HTML form to send out the e-mail from your server. Note that there are many tutorials online for pre-populating forms: https://www.google.com/search?q=php+pre-populating+forms Just be aware that this has a greater potential as being marked as spam. Also, if you choose to go this route, be aware of e-mail injection attacks: https://www.google.com/search?q=php+email+injection
  2. I would be careful with rushing the form. In addition to it not working, the script which sends out the e-mail could be used for e-mail injections. Note that there are many articles online for more information: https://www.google.com/search?q=php+injection+email As for getting something online soon, have you considered using a third-party solution? Google forms, for example, are free and can be embedded within existing websites. https://support.google.com/drive/answer/87809?hl=en The customization options are a little to be desired, but it's something to consider while you figure out an alternative.
  3. So basically, you have an HTML drop down menu and you're looking to set the default selection. Is that correct? Also, can you show the code for the compare() function?
  4. Can you provide any more specifics on what you're looking to do? Have you considered passing the necessary information using GET variables? PHP file 1 could send a flag to file 2 which generates the variable. File 2 can then send the variable back to file 1 using a header redirect. http://php.net/manual/en/function.header.php
  5. Also, I would imagine that image tag needs to go inside the foreach loop. <?php $files = glob('wp-content/uploads/'.$user_id.'/*'); foreach($files as $file) { echo '<img style="max-width:100%;" src="' . $file . ' />'; } ?>
  6. This is just a guess, but it looks like you dropped the line of code which defined $user_id. $user_id = get_current_user_id();
  7. The quotes look fine. To make some of the form fields required, you can run a series of if tests on the information. If the name is required, for example, check that the corresponding variable contains a value. If everything looks good, the e-mail can be sent. Otherwise, send them back to the form...or display an error message. Note that there are many tutorials online for making fields required. https://www.google.com/search?q=php+make+form+fields+required Try a few things out and if you get stuck, feel free to post again.
  8. Just to clarify, Barand was asking you to provide the output for the array using his version of print_r()...or using the function. The output provided in the original post is difficult to wade through when there are no line breaks. Also, it might be helpful to see the portion of your code which pertains to the topic at hand. What have you tried?
  9. What do you mean that the form doesn't even work as one? Are you getting errors? What is it doing that's unexpected? Side note: your form has two separate id attributes with the same value. <form id="jobnumber" method="post" action=""> <input type="text" name="jobnumber" id="jobnumber"/> The id value can only be used once throughout the page. http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
  10. As Jessica mentioned, the original code is invalid. The first string wasn't ended, for example. This: $strHtmlOutput.= ' <tbody> <tr> $strHtmlOutput.= '<tr> <th>Date of Request</th> <td> '.$result['cdate'].' </td> </tr> '; Should be: $strHtmlOutput.= ' <tbody> <tr>'; //<-- close string here $strHtmlOutput.= '<tr> <th>Date of Request</th> <td> '.$result['cdate'].' </td> </tr> ';
  11. It might also be helpful to see the code for the form.
  12. Does that mean the forms work as you expect now? Side note: I would recommend using the <label> tag for your form labels. For more information, visit http://www.cyberscorpion.com/2012-02/making-html-forms-more-accessible-and-improving-usability-with-the-label-tag/
  13. What about the next step? Does $clubname have a value after it's created? Note that the code doesn't really show what happens to $clubname after it's initialized. Unless I'm missing something, you'll need to post more code.
  14. Have you done anything to see how the variables are working (or not) throughout the process? When the form loads, for example, do the hidden form fields contain a value?
  15. What do the values in the property column look like? Is there a separator between each component?
  16. You're currently fetching the first row of data after executing the query...and then again in your do/while loop. If you switch to a while loop, you would only need to have the fetch in there once. <?php //... $recordset1 = mysql_query($query_recordset1, $Connection1) or die(mysql_error()); $row_recordset1 = mysql_fetch_assoc($recordset1); //... ?> <?php } while ($row_recordset1 = mysql_fetch_assoc($recordset1)); ?>
  17. Is Dreamweaver writing the code for you...or are you just using it as a text editor? Using Dreamweaver in Code view doesn't add extra code that I'm aware of.
  18. You could store the form information within a database and grab it as needed. Could you provide a little more information on what you're trying to do?
  19. Have you tried running mysql_error() after the query which causes the error? http://php.net/manual/en/function.mysql-error.php
  20. You sure can
  21. Can you (or someone) clarify why PDO is inherently more secure than MySQLi?
  22. It looks like the OP just wants the single ID for the item to remove. I would personally use anchor tags instead of the remove buttons and the HTML form.
  23. One problem is that you have one form and many hidden input fields named "id". When the form is submitted, you may not get the desired input.
  24. Maybe this will help: http://www.tizag.com/mysqlTutorial/mysqlleftjoin.php
  25. If you're going to use the anchor tag, you don't need the form tag anymore. If you want the link to look like a button, you can create one as an image...or use CSS to style the text. As for the ID, have you made sure that $recipe['id'] contains a value? You can use var_dump to find out: http://php.net/manual/en/function.var-dump.php Note that your original code used a different variable ($recipe_id).
×
×
  • 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.