Jump to content

EKINdesigns

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

About EKINdesigns

  • Birthday 04/11/1987

Contact Methods

  • AIM
    EKINdesigns
  • MSN
    admin@ekindesigns.com
  • Website URL
    http://www.ekindesigns.com

Profile Information

  • Gender
    Not Telling
  • Location
    USA

EKINdesigns's Achievements

Member

Member (2/5)

0

Reputation

  1. I need to find out if a message has an attachment or not without downloading all the data. Is there an easy way? I found parsing imap_fetchstructure() will give me the correct results but I heard it downloads the whole attachment and not just the message structure. Any help?
  2. You should also get rid of the <br> tags. Assign your <span>'s a "display: block;". This will force them to line break.
  3. Strike mine...The haystack is supposed to be the first var of the function.
  4. $year = substr(0,4,$date); $day = substr(4,2,$date); $month= substr(6,2,$date); I think that should work.
  5. Please let me know what you think about this concept idea. I think it would be more secure than the normal. Store the username in a cookie and the password in a session. Reason this would be more secure: 1.) If someone gets a hold of the session ID they are missing the username (so we assume its a hack and delete the session data). 2.) If someone, somehow, hacks the session data they are, again, missing the username. 3.) Someone gets a hold of a cookie (harder since it is located on clients machine) they are missing the password. 4.) If the users session ends but the username is still in the cookie ask to verify password to re-login. Please let me know if this concept is a good idea. I haven't seen this implemented anywhere else. Thanks, Jeff
  6. I prefer to secure the information on insertion but format it when I extract it. I don't like having HTML code in my database. The nl2br() function is what you want though. Browsers don't display newlines. Using this function you convert new lines to break tags which the browser understands.
  7. Also, why do you do: <?php echo "{$row['_model']}"; ?> Its better practice to do this instead: <?php echo $row['_model']; ?>
  8. Grab the value of the drop down from the database the do something like: <select name="_odometer"> <option value=""></option> <option value="Actual"<?=($row['_odometer'] == "Actual") ? " selected" :NULL;?>>Actual</option> <option value="Not Actual"<?=($row['_odometer'] == "NotActual") ? " selected" :NULL;?>>Not Actual</option> <option value="TMU"<?=($row['_odometer'] == "TMU") ? " selected" :NULL;?>>TMU</option> </select>
  9. <? $conn = mysql_connect('localhost','username','password'); $db = mysql_select_db('database_name',$conn); $query = "SELECT * FROM months"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { ?> <select value="<?=$row['id'];?>"><?=$row['month'];?></select> <? } ?> With the little information I have, try that.
  10. Try in the actual function above. <!-- function testCreditCard () { if (checkCreditCard (document.getElementById('payee_cardNum').value,document.getElementById('payee_cardType').value)) { alert ("Credit card has a valid format") } else { alert (ccErrors[ccErrorNo]); return false; }; } //--> Give that a go.
  11. I believe you need to return false in order to stop the submit. i think you can also place void(0) in the onclick command, then submit the form in javascript if its validated.
  12. Alright...After a few weeks I was able to figure out a lot of the query. I have only one thing left. I will re-explain when I am trying to accomplish: I have 3 tables: forums, topics and users. I need to select all the forums ordered by ID, I also need a topic count for that forum, and the most recent topic with the user information. Currently I get everything including topic but it isnt the most recent. This is what I have: $query = "SELECT `forums`.{$select} , COUNT(`topics`.`id`) AS `topic_count` , `topics`.`id` AS `recent_topic_id` , `topics`.`title` AS `recent_topic_title` , `topics`.`date` AS `recent_topic_date` , `users`.`id` AS `recent_topic_poster_id` , `users`.`username` AS `recent_topic_poster` FROM `forums` LEFT JOIN `topics` ON `topics`.`fid` = `forums`.`id` LEFT JOIN `users` ON `users`.`id` = `topics`.`poster` WHERE `forums`.`cid`='{$id}' GROUP BY `forums`.`id` ORDER BY `forums`.`id`";
  13. I am trying to select from 3 different tables: categories, topics, and users. I need to select all the categories whether or not there are topics in them. If there are topics i need to get the total amount of topics as well as the most recent one defined my `date`. I also need to get the users information who posted each topic. This is what I have so far. Currently if there are no topics in the category it will only return one category when there are actually multiple. I also can't figure out how to select the most recent topic information. SELECT `forums`.{$select} , COUNT(`topics`.`id`) AS `topic_count` , MAX(`topics`.`date`) AS `recent_topic_date` FROM `forums` LEFT JOIN `topics` ON `topics`.`fid` = `forums`.`id` LEFT JOIN `users` ON `users`.`id` = `topics`.`poster` WHERE `forums`.`cid`='{$id}' GROUP BY `topics`.`fid`
×
×
  • 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.