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 (2/5)
0
Reputation
-
you can save them on the onClick.
-
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?
-
You should also get rid of the <br> tags. Assign your <span>'s a "display: block;". This will force them to line break.
-
Strike mine...The haystack is supposed to be the first var of the function.
-
$year = substr(0,4,$date); $day = substr(4,2,$date); $month= substr(6,2,$date); I think that should work.
-
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
-
Formatting Data pulled from a Database?
EKINdesigns replied to stublackett's topic in PHP Coding Help
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. -
[SOLVED] Pre-filling Forms with Database Information
EKINdesigns replied to virtuexru's topic in PHP Coding Help
Also, why do you do: <?php echo "{$row['_model']}"; ?> Its better practice to do this instead: <?php echo $row['_model']; ?> -
[SOLVED] Pre-filling Forms with Database Information
EKINdesigns replied to virtuexru's topic in PHP Coding Help
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> -
<? $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.
-
validation fails and page submits on error :(
EKINdesigns replied to wmguk's topic in PHP Coding Help
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. -
validation fails and page submits on error :(
EKINdesigns replied to wmguk's topic in PHP Coding Help
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. -
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`";
-
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`
-
Ha...What are you asking?