Jump to content

AbraCadaver

Staff Alumni
  • Posts

    1,893
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by AbraCadaver

  1. Nothing about: $test = ($_POST['marketingvalue']); Would cause: Array to string conversion in C:\wamp\www\survey\page_3.php on line 164
  2. If you have a recent PHP version and zlib compression enabled the use PharData or the Phar class or use the command if you're on Linux: exec('tar zxf /path/to/file.tar.gz');
  3. Looks to me like the id is the array index? [1720]=> array(40) { ["product_id"]=> string(4) "1720" So just: unset($array[1720]);
  4. $Email is probably not what you think it is. echo $Email;
  5. No reason for a loop of all records. The database will return what you want and then you can check it. Just query to see if the one record is there: SELECT * FROM inventory WHERE vin = $_POST['vin'] And then check mysqli_num_rows() to see if you got results. If not, inset and if so don't. You should still escape the $_POST data with mysqli_real_escape_string().
  6. If made_live is a MySQL DATE type then the format is 2013-08-28, though I don't know if that would cause a failure.
  7. It's probably a string. $Price = number_format((float)$preownedinfo->Price, 2);
  8. OK. I assume the table is called Profile and not the database? If not substitute below: SELECT *, (YEAR(CURDATE()) - YEAR(DOB))as Age FROM Profile WHERE Gender = 'Female' AND Age BETWEEN 18 AND 23
  9. Try that: echo "<input type='checkbox' name='process[]' value='" . $rowProcess["process_id"] . "' selected='selected'>" . $rowProcess["process"] . "<br>"; As for the array, I showed you in my post and it is shown in the code above. In the page that receives the submitted data you woudl loop through $_POST['process'] or concatenate them or whatever you need for the end result (which we haven't seen).
  10. What determines if they are preselected? If your query returns process_ids 2, 3 and 5, which ones are selected? If all of them then that easy, just add selected="selected" to all the checkboxes. Also, if you have more than one input named process then only the last one will be submitted. You need to create an array of process checkboxes: name="process[]". Then you can access the $_POST['process'] array after submit.
  11. mysqli_fetch_array() returns both numeric and associative by default. You can specify with MYSQLI_ASSOC or MYSQLI_NUM with the second optional argument.
  12. fwrite($socket, "JOIN #channel channelkey\r\n");
  13. The only way to do this without the user being able to get around it is to make them login. Even making them login can be gotten around if they signup multiple times with different ids. You could use a session var or a cookie, however the user can delete their cookies. IPs may be shared by many people and it will change if you go from your house to Starbucks.
  14. And it seems as if the guy has some opinions on it as well: http://r.je/views-are-not-templates.html
  15. Not sure, but I don't think there should be a colon : there.
  16. On the add form you could set a hidden input named "add" since that's the only possibility for that form, but that won't help you on the edit/delete form because that hidden input won't let you know which button was clicked.
  17. Well, try "add_x", but maybe do a print_r($_POST) on excision.php and check it to make sure that I'm correct on the naming. You'll need to change the isset for the edit and delete as well.
  18. On excision.php you need to do a print_r($_POST) to see what the buttons are named. Instead of "add" you'll have two like "add_x" and "add_y" and the values will be the coordinates of the image that were clicked. Most likely in excision.php you're checking for $_POST['add'] or something similar.
  19. In each of those files, change the filename in <form action="test.php"... to the actual name of the file it is in.
  20. Your previous post was moved to MySQL. Why repost? http://forums.phpfreaks.com/topic/281477-update-field-table-value-1/
  21. date() is a date formatting function. The DateTime class can format a date / time but it has many more features to manipulate dates and times etc. Since all you needed was to format todays date, I didn't see any need to create an object.
  22. $newname = dirname(__FILE__) . '/Uploads/' . date('Y_m_d-H:i:s') . '-' . $filename;
×
×
  • 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.