Jump to content

cyberRobot

Moderators
  • Posts

    3,145
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by cyberRobot

  1. Authorize.Net provides documentation online for integrating their service. Perhaps your questions will be answered in the FAQ: http://developer.authorize.net/faqs/ ...or maybe in their training videos: http://developer.authorize.net/training/ I haven't used PayPal in this capacity before, but I would imagine they have similar resources available.
  2. I'm not sure how this applies directly to the topic at hand, but PHP can also handle validation: http://php.net/manual/en/filter.examples.validation.php
  3. Try changing $EmailFrom to an email address. More information about the mail() function (including some examples) can be found here: http://php.net/manual/en/function.mail.php
  4. Could you provide a little more context for the code? For example, are you adding the code so that $rows is actually defined? Note that you could try adding the following (temporarily) to see what the variable contains: var_dump($rows['Notes']);
  5. There are button under each response to the right. For the response which most closely answers your question, click the one that says "Mark Solved".
  6. Note that the parenthesis are out of place. The above should look more like the following: <?php $notes = (!empty($rows['notes'])) ? $rows['notes'] : ''; ?>
  7. So...the issue is fixed? If so, could you make the thread as solved. For what it's worth, when having a variable like $_GET['id'] work in a double quoted string you can surround the variable with curly brackets: <?php $query = "SELECT * FROM Clients WHERE ID={$_GET['id']} " ?> Also note that using information from untrusted sources, like the GET variable, without any kind of validations will open your query up for SQL injection attacks. Assuming the ID is a number you could make sure it is with the ctype_digit() function: http://us1.php.net/ctype_digit
  8. Have you looked into the mail() function? http://php.net/manual/en/function.mail.php You could formulate a message on the page of interest.
  9. As in visiting a specific page...or if someone visits any page on a website? It might also help if you provide a little more information on what you're trying to accomplish. To be honest, getting an email every time someone visits a page seems inefficient. If you're just interested in knowing how people visit the website, you could utilize something like Google Analytics: http://www.google.com/analytics/
  10. Did you try adding the following line to the code to see what the variable contains? If so, what does it display? <?php echo '<pre>' . print_r($config['html'], true) . '</pre>'; ?>
  11. Instead of using global, have you considered doing something like <?php function multipli() { return $_POST['fnumber']*$_POST['snumber']; } $num = multipli(); echo $num; ?> ...or <?php function multipli() { return $_POST['fnumber']*$_POST['snumber']; } echo multipli(); ?>
  12. Perhaps I'm missing something, but your code doesn't really do anything besides echo an undefined variable. $num is defined as a global variable in the multipli() function. But the function is never called...so the code isn't executed. Even if the function was called, the POST variables being multiplied are assigned to $num3 which isn't used again. EDIT: That last part doesn't apply anymore.
  13. Did you try using mysql_error() to see if the query results in an error? http://php.net/manual/en/function.mysql-error.php
  14. Does $config['html'] automatically update itself? In other words does it always point to the proper location no matter where you're at in the file structure? If so, it should be fine to just include it as is...without $_SERVER['DOCUMENT_ROOT'].
  15. Perhaps a solution listed here will help: https://www.google.com/search?q=php+sort+array+without+function
  16. You could look into the float property in CSS: https://www.google.com/search?q=css+float If that doesn't work for your situation, CSS positioning might be the answer: https://www.google.com/search?q=css+positioning
  17. Just to clarify, $config['html'] contains "./theme/neo-green/html.php"? If so, could you clarify where $config comes from? If this comes from a third-party solution, maybe there is some documentation online. There may be something else in $config, for example, that could be used to get a root-relative link. You could even try adding the following and see if it displays everything in the variable: <?php echo '<pre>' . print_r($config, true) . '</pre>'; ?>
  18. Side note: You should take a look at the following article which talks about the problems with using PHP_SELF as the action attribute for a form: http://seancoates.com/blogs/xss-woes
  19. The following tests if the POST variable for submit isn't set. if(!isset($_POST['submit'])) { That part of your code should only run if the submit button was clicked.
  20. $config is likely an array containing some configuration information. You could try echoing the variable to see what it contains: <?php echo '<pre>' . print_r($config['html'], true) . '</pre>'; ?>
  21. Just to clarify, that should be tags. Surrounding your code with those tags makes the post much easier to follow.
  22. Is the error being display before or after the form is submitted? If it's before, $_POST isn't defined yet. To avoid error regarding an undefined variable, you could use isset(). http://php.net/manual/en/function.isset.php
  23. You could change sidebar.php to sidebar.txt and use file_get_contents(): http://us1.php.net/file_get_contents
  24. You could always give it a try. Based on a cursory look, an email will likely go out. To avoid that, you could try moving the form validation inside your if construct which tests the CAPTCHA value. Also, you should look into email injections if you haven't done so already. https://www.google.com/search?q=email+injection+php To help avoid issues, I would recommend validating the user-supplied email address: http://php.net/manual/en/filter.examples.validation.php
  25. The corresponding form filed is lower case: <input type="text" name="companyname"> The POST variable needs to match.
×
×
  • 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.