Jump to content

hitman6003

Members
  • Posts

    1,807
  • Joined

  • Last visited

Everything posted by hitman6003

  1. Change all of your vars in the email from <?php echo $varname; ?> to ' . $varname . ': [code]Customer Information<br> Ban: <?php echo $txtBanNum; ?> txtWirelessNum <?php echo $txtWirelessNum; ?><br> txtCustomerName <?php echo $txtCustomerName; ?>[/code] should be: [code]Customer Information<br> Ban: ' . $txtBanNum . ' txtWirelessNum ' . $txtWirelessNum . '<br> txtCustomerName ' . $txtCustomerName . '[/code]
  2. They are single quotes.  You have two options.  Use addslashes (http://www.php.net/addslashes) or use mysql_real_escape_string (http://www.php.net/mysql_real_escape_string) on the var that is giving you trouble (not the whole query)
  3. Have you looked in the manual? Going to the fsockopen page and doing a search for "post" yielded many results that will proabably answer your question. http://www.php.net/fsockopen
  4. Sockets tutorial: http://www.phpfreaks.com/tutorials/50/0.php
  5. You didn't ask a question.  All you did was post some code.  What is the problem?  Where is the problem in your code?  What have you tried to do to fix it?  What are the events that cause the problem to occur?
  6. Make sure you do some checking on the user inputs to verify that they are valid input and not an attempt to cause harm to your database.
  7. Ummm, put an anchor tag around it.... [code]<a href="nextpage.php"><img src="image.png" border="0" /></a>[/code]
  8. Something like this should work: [code]$query = "SELECT * from tblPatient"; if ( $_POST['lname'] != "") { $where[] = "lname LIKE '%$lname%'"; } if ( $_POST['fname'] != ""){ $where[] = "fname LIKE '%$fname%'"; } if ($_POST['dob'] != ""){ $where[] = "dob LIKE '%$dob%'"; } if (count($where) > 0) { $query .= " WHERE " . implode(" AND ", $where); } $result = odbc_exec($odbc, $query) or die (odbc_errormsg()); $row = odbc_fetch_array($result);[/code]
  9. You will have to break the word appart to search for it's peices.
  10. [code]$q = mysql_query("SELECT * FROM ebb_blacklist WHERE blacklisted_username LIKE '%$value%'") or die(mysql_error());[/code]
  11. Here is a tutorial on file uploads: http://www.phpfreaks.com/tutorials/85/0.php And here is one on image uploads specifically: http://www.phpfreaks.com/tutorials/36/0.php
  12. If that is the insert query, then you aren't inserting anything into the database.....
  13. [quote]If so, what can I do about that?[/quote] Fix your code.  Or post the offending part, and maybe we can help.
  14. I would use a single array, with the prices being the key and the item being the value.  Then you can use the ksort (http://www.php.net/ksort) and krsort (http://www.php.net/krsort) functions. As for getting values in an array: [code]<?php $query = "SELECT price, item FROM table"; $result = mysql_query($query) or die(mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {   $price = $row['price'];   $data[$price] = $row['item']; } ksort($data); echo '<pre>'; print_r($data); ?>[/code]
  15. This line: [code]$headers = "From: support@maxwho.com\r\n" .[/code] and this line: [code]$maxwhoHeaders = "From: $email\r\n" . [/code] Should end in a semicolon, not a period.  What's happening is you are concatenating your message body onto your headers, then also including it in the body, so it appears as though the message is being sent twice.
  16. Loop through the first array and use array_key_exists (http://www.php.net/array_key_exists) to see if the value is a key.
  17. You can redirect the user to a different page using the header command, assuming you haven't output anything to the browser: [code]header("Location: nextpage.php");[/code]
  18. [code]UPDATE table SET column = column + 5 WHERE id = '$id';[/code]
  19. Either of these two should work for you: [code]$grad = array($row['Grad']); $bestigning = array($row['Bestigning']); $score = $grad[0] * $bestigning[0]; echo $score; $score = array($row['Grad'], $row['Bestigning']); echo(array_product($score));[/code]
  20. Use array_diff_key (http://www.php.net/array_diff_key)
  21. That means you are missing a closing curly brace ( } ).  Looks like it make be here: [code]if(isset( $_GET['tgartname'] ) ) { $head = 'Terragen'; $subhead = $row_terragenart['terragenname']; ?>[/code]
  22. Sorry Barand...I completely missed your post for some reason...didn't mean to reiterate what you said.
  23. You are reusing the same variable name twice, so the latter instance will overwrite any earlier values. If you want to know exactly what is being passed in the url parameters, then do a print_r of the $_GET array. [code]echo '<pre>'; print_r($_GET);[/code] Also, use $_POST and $_GET instead of $_REQUEST.
  24. [quote]I too now use 5.1.4, and I can't recall this behaviour ("0" evaluating as equal to all strings) in previous versions... [/quote] It doesn't always convert to zero.  See here: http://us2.php.net/manual/en/language.types.string.php#language.types.string.conversion
×
×
  • 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.