AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
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
-
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
-
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"); ?>
-
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
-
you will want to use the "AND" statement with your WHERE statement you can look here
-
<?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
-
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
-
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
-
Errors are not logging to errors.log
AyKay47 replied to hmdnawaz's topic in PHP Installation and Configuration
set display_errors to ON -
anything wrong with this query ???
AyKay47 replied to YoungNate_Black_coder's topic in PHP Coding Help
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? -
yes thank you Fenway For comparison of the meta_value field, you can use the mysql function UNIX_TIMESTAMP()
-
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
-
http://php.net/manual/en/language.references.pass.php
-
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
-
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?
-
you can probably use str_replace to replace the newline character(s) however without seeing you code its hard to say
-
they are also used for plain text as xyph said...like with the mail() function
-
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
-
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?
-
hard to say, i'm not sure what format that time-stamp is in
-
you can put it into the www dir and use ../ to back out into the tmp dir i believe
-
cool, no problem
-
yes you're right man, my fault
-
have you looked into using a Union ?
-
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());