Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. the error states that your output was started on line 1, so I am assuming that there is white space before your opening <?php tag
  2. well if you want to store them as an array in one row, use serialize and unserialize However I would recommend that you insert each id separately, but i'm not sure exactly how your table is set up
  3. oh okay you're using windows..then you'll want <?php $email = $_POST['email']; $file = fopen("mailing.txt", "a"); fwrite($file, $email."\r\n"); fclose($file); header("Location: mailing_thankyou.php"); ?> or also <?php $email = $_POST['email']; $file = fopen("mailing.txt", "at"); fwrite($file, $email."\n"); fclose($file); header("Location: mailing_thankyou.php"); ?>
  4. on of the main reasons for using the HEREDOC syntax is it eliminates the need to escape special characters inside of it, and allows for neater strings
  5. you will want to use the "AND" statement with your WHERE statement you can look here
  6. <?php $email = $_POST['email']; $file = fopen("mailing.txt", "a"); fwrite($file, $email."\n"); fclose($file); header("Location: mailing_thankyou.php"); ?> should work, depending on the OS you are using
  7. if you are looking to find matches in the two arrays, array_diff is the opposite of what you want, as it displays the differences in the two comparing arrays... You will want to use array_intersect
  8. the default upload size is 2MB...20778KB is much larger than 2MB, so the file wont even upload.. You can change these setting in your php.ini file by looking for upload_max_filesize and post_max_size
  9. function get_inc(){ $clutches = "SELECT * FROM cluth WHERE uid = '$id'"; $clu = mysql_query($clutches)or die(mysql_error()); echo "<tr><td>Number.</td><td>clutch Size.</td><td>Worth</td></tr>"; $i = 1; while($result = mysql_fetch_array($clu,MYSQL_ASSOC)){ //result_type is not needed but is fine as-is $cid = $result['id']; $sire = $result['sire']; $dame = $result['dame']; $datel = $result['date_layed']; $size = $result['size']; $price = $result['price']; echo "<tr><td>$i.</td><td>"; <a href=\"?room&height=350&width=520&modal=true\" class=\"thickbox\" title=\"$sire+$dame\"> ($size) Egg Clutch</a> </td><td>$price</td></tr>"; $i++; } } only thing I changed is the redundancy of the $result variable you can also echo $i++ instead of $i whats going on with your href?
  10. yes thank you Fenway For comparison of the meta_value field, you can use the mysql function UNIX_TIMESTAMP()
  11. I find it hard to believe that if you are properly debugging both your mysql connection and your db selection that you would not receive any errors in your script
  12. http://php.net/manual/en/language.references.pass.php
  13. my code should work if you have the primary key field set to auto-increment. same query i wrote, different way...OP, backticks aren't needed since none of your filed names are mysql reserved words but they can be used
  14. I don't understand how that wouldn't work...setting a variable to the int 2 is the same as passing the actual int 2...maybe something in your class itself?
  15. you can probably use str_replace to replace the newline character(s) however without seeing you code its hard to say
  16. they are also used for plain text as xyph said...like with the mail() function
  17. i assuming that you also have it set to auto-increment...if so, use this query instead $registerquery = mysql_query("INSERT INTO users VALUES('', '$username', '$password', '$email')") or die(mysql_error()); //blank field for the ID mysql field
  18. your query should not be inserting a value of 0 for your primary key anyway...this leads me to believe that it is trying to insert invalid data into your primary key...what are your field names for that db table?
  19. hard to say, i'm not sure what format that time-stamp is in
  20. you can put it into the www dir and use ../ to back out into the tmp dir i believe
  21. cool, no problem
  22. yes you're right man, my fault
  23. have you looked into using a Union ?
  24. Since you are receving that specific error, something lmust be going wrong with your query. Try to debug it $registerquery = mysql_query("INSERT INTO users (Username, Password, EmailAddress) VALUES('".$username."', '".$password."', '".$email."')") or die(mysql_error());
×
×
  • 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.