Jump to content

digitalgod

Members
  • Posts

    374
  • Joined

  • Last visited

    Never

Everything posted by digitalgod

  1. depends of what you're doing, since strlen returns an integer you need to check if the length is 0. if you would have done if($someName == 0) that would check if your variable is FALSE
  2. 0 is for strlen, meaning if the string has a length of 0 as opposed to "" which just means that the value inside your variable is basically empty
  3. you mean from a datetime field? SELECT date_format( yourcolumn, '%c/%e/%Y %T' ) FROM table
  4. there's a space in your table's name, you need to use backticks
  5. try putting the table name between backticks `` and add a or die(mysql_error()) to your insert query in order to see what's the error you're getting
  6. switch those 2 $_POST['some_name'] = $some_name;
  7. change $imagename = $_FILES['new_image']['name']; to whatever you want, you can even generate a random name using rand() as for the db part just add an INSERT query before echo "<img src='Lost/".$imagepath."'> might want to use sumfight's exception handling to see whether or not the image has been uploaded and resized before inserting in your db
  8. <?php $someName = stripslahes(mysql_real_escape_string($_POST['some_name'])); if( $someName != "" ) { // insert } else { //error }
  9. try <? $fileName = "../name.txt"; $fh = fopen($fileName, 'r'); $exists = file_exists($fileName); echo $exists; $nameB = fread($fh, filesize($fileName)); echo $nameB; $name = explode("\n",$nameB); fclose($fh); $fileName = "../var.txt"; $fh = fopen($fileName, 'r'); $varB = fread($fh, filesize($fileName)); $var = explode("\n",$varB); for ( $id = 0; $id <= $maxid; $id += 1) { echo "<option value='$var[$id]'>$name[$id]</option>"; } fclose($fh); ?>
  10. and is it working? you need to setup a cron job so that your script runs daily. If you have a panel like cpanel there's an option in there to setup cron jobs.
  11. it would really help if you told us what errors you're getting or if you're not getting any what happens when you submit.
  12. if you check your img src it looks like this Georgia Farm & Forest\Bartow\Bartow 9520\Images\IMGP1202.JPG I would suggest just having the name of the image in your database and then do this echo "<img src=\"images/$showcase_image\" width=\"100\" height=\"100\" align=\"middle\" >"; or wherever your images are located also it's much cleaner if you remove all those echo and do something like <table cellspacing="15"> <? while($row = mysql_fetch_assoc($result)) { extract($row); ?> <tr><td> <img src="<?=$showcase_image?>" width="100" height="100" align="middle" > <?=$prop_title?> <?=$prop_desc?> <a href="showdetails.php?id_number=<?=$id_number?>"><div align="right">View Details</div></a>"; </td></tr> <? } ?> </table> but that's just a matter of personal taste
  13. hey guys, ok not sure how I'll explain this but here goes I have 2 tables members +-------+-------------+---------------+ | id | username | email | +-------+-------------+---------------+ | 1 | user1 | blah@blah.com | | 2 | user2 | 123@123.com | | 3 | user3 | abc@abc.com | +-------+-------------+---------------+ friends +-------+-------------+---------------+ | id | owner | member | +-------+-------------+---------------+ | 510 | 18489 | 3 | +-------+-------------+---------------+ I want to select all the members that match an array of emails like so SELECT id,username FROM members WHERE email IN ( '$list' ) but at the same time I don't want it to return results for entries that are in the friend table. So say that my id is 18489 and that I'm looking for blah@blah.com, 123@123.com and abc@abc.com it will only return id 1 and 2 because id 3 is in the table friends and I ("owner" 18489) am the owner.. what do I have to add in my initial query in order to achieve that don't know if that makes any sense... any help would be greatly appreciated!
  14. thanks Crayon I'll give it a shot. why the "" sasa? I'll try it both ways
  15. I use a combo of Dreamweaver and Intype, still in beta but I love it
  16. Don't mind the missing FROM in my $query example. I could have sworn there was a Modify button but all I see is Quote...
  17. you need to do $newquant = $copy['QtyOnHand'] - $_POST[Consumed]; since your results are store in the array $copy hence mysql_fetch_array
  18. hey guys, say I have an array of emails that I'd like to verify if they exist in a db, would there be a better way than having a select query for each email? something other than <? for ($i=0; $i < $max; $i++) { $query = "SELECT id WHERE email = '" . $aEmail[$i] . "' " $result = mysql_query($query) or die(mysql_error()); $numRows=mysql_num_rows($result); // etc... } ?>
  19. just replace $sql = "SELECT * FROM tbl WHERE id=$id"; with whatever column you're using for id in your db, as well as the table name
  20. that's because you're using the assignment operator, you should use "==" without the quotes, you should also add quotes to Yes and No so your code should look like this if ($row[exemption_type]=='Yes'){ some code } else if($row[exemption_type]=='No'){ some code } else echo "Error";
  21. I don't know about attachments but yes I was able to parse emails, where are you having problems?
  22. there's an entire section dedicated to tutorials for phpDoc on their site, it can be found here http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.pkg.html
  23. it's actually exactly the same, nothing changed that's why I'm wondering if I did anything wrong
  24. is there something else I should be doing in order for tidy to work?
×
×
  • 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.