Search Results

Showing results 1 to 31 of 31
Search took 0.01 seconds.
Search: Posts Made By: dickersonka ; Forum: PHP and child forums
Forum: PHP Nov 13th, 2008
Replies: 11
Views: 3,015
Posted By dickersonka
it is giving you the highest id in that table, when you do the insert use


select LAST_INSERT_ID();


this will give you the id of that row, not the highest one in the table
Forum: PHP Nov 13th, 2008
Replies: 11
Views: 3,015
Posted By dickersonka
you can do it that way, i would suggest returning a value from a stored procedure like


select LAST_INSERT_ID();
Forum: PHP Nov 10th, 2008
Replies: 7
Views: 509
Posted By dickersonka
1. very easy (mysql_connect)
2. believe you are looking for an insert statement
3. update, delete, and update statements
4. schema/user privileges
Forum: PHP Nov 7th, 2008
Replies: 2
Views: 468
Posted By dickersonka
is the user on the system? or is the user only in the database?

and which user are you creating the folders with?
Forum: PHP Oct 29th, 2008
Replies: 2
Views: 395
Posted By dickersonka
And just as good practice, a database is there for the organization, it doesn't need to be in sequential order.

It may look prettier to you if it is, but just add an order by user_id or whatever...
Forum: PHP Oct 29th, 2008
Replies: 2
Views: 395
Posted By dickersonka
i don't have a clear idea of what you are wanting

the message_from field has a 3 and it needs to be a 104?
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,033
Posted By dickersonka
That is the point of the query, you are able to distinguish in the same resultset of who are chaplains and not. You want to use the same column and distinguish code side by checking user_level.
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,033
Posted By dickersonka
thats because you are assigning it, the is_chaplain column didn't exist and we had to give it values, the user level column does exist

use this in both queries and you will get your 2 or 3

...
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,033
Posted By dickersonka
yes, i thought you meant you didn't have a way to distinguish

instead of the is_chaplain, substitute the user_level into the query
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,033
Posted By dickersonka
i think we need to add single quotes around the is_chaplain


//readers
0 as 'is_chaplain'

//chaplains
1 as 'is_chaplain'
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,033
Posted By dickersonka
SELECT assignment.Id, assignment.Candidate, assignment.`Section`, assignment.Team, assignment.Chaplain, assignment.Reader, tbl_user.Id, CONCAT_WS(' ', `tbl_user`.name_pre, `tbl_user`.name_first,...
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,033
Posted By dickersonka
If you need the results separated, then why not issue 2 queries?

Or add an additional column to the rows for the union,
for readers 0 as IS_CHAPLAIN
for chaplains 1 as IS_CHAPLAIN
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,033
Posted By dickersonka
i don't get what the difference is in the concat of the chaplain, you are using the same columns

can you show what the concat difference is?
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,033
Posted By dickersonka
f_name field is just pre + first + last + suffix

it will use the same formatting for both readers and chaplains

if you want this field different, please explain more clearly with an example of...
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,033
Posted By dickersonka
WHERE tbl_user.Id= assignment.Reader OR tbl_user.Id = assignment.Chaplain


i think this is what you are looking for with the additional where
Forum: PHP Sep 16th, 2008
Replies: 6
Views: 561
Posted By dickersonka
Should work, but you might want to use this for strings

if you don't care about case use strcasecmp instead strcmp

if equal they will return 0


if(strcmp($email1, $email2)==0){
echo...
Forum: PHP Sep 11th, 2008
Replies: 35
Views: 2,691
Posted By dickersonka
maybe at least enter the first letter of the county, lol hope they won't mess that up
Forum: PHP Sep 1st, 2008
Replies: 2
Views: 868
Posted By dickersonka
you can do it as select it from the mysql side


select time1, time2, addtime(time1,time2)
from table
Forum: PHP Aug 31st, 2008
Replies: 6
Views: 790
Posted By dickersonka
what happens if you just use

setcookie(ID_my_site);
setcookie(Key_my_site_);
Forum: PHP Aug 30th, 2008
Replies: 5
Views: 586
Posted By dickersonka
session is only for the time the user has your site opened

if you need expiry time after you close the browser, use cookies as architact stated
Forum: PHP Aug 30th, 2008
Replies: 6
Views: 790
Posted By dickersonka
agree with kavitha

use this to destroy the session

session_destroy();


this to reset the cookie
if its cookie just set to its name
Forum: PHP Aug 28th, 2008
Replies: 11
Views: 1,011
Posted By dickersonka
i use javascript for client side validation, not for functionality

lets say for a field that will be submitted needs to be a minimum of 8 characters, they type 4, and i can use javascript to warn...
Forum: PHP Aug 28th, 2008
Replies: 11
Views: 1,011
Posted By dickersonka
If they have javascript disabled, you'll never be able to update the quantites.

Think of adding an item, the same as changing quantities, overall it is a change.

You could repost the quantities...
Forum: PHP Aug 26th, 2008
Replies: 35
Views: 2,691
Posted By dickersonka
Its all up to you. Typically you would not let the user know how many attempts they have left and just display a message after they have locked themselves out, that their account has been locked and...
Forum: PHP Aug 26th, 2008
Replies: 35
Views: 2,691
Posted By dickersonka
It is a constant battle to keep up with security and hackers or what not.

The only thing you can do is try and stay ahead of the game.
Make users have secure passwords, if user's are complaining,...
Forum: PHP Aug 26th, 2008
Replies: 35
Views: 2,691
Posted By dickersonka
Yes, do the other checks first like the link showed and if they ARE EMPTY, then rely upon the REMOTE_ADDR.
Forum: PHP Aug 26th, 2008
Replies: 35
Views: 2,691
Posted By dickersonka
The problem will be that if your users are behind the proxy, you will be blocking all of them from the same ip address without using the additional code.
If they aren't behind the proxy...
Forum: PHP Aug 26th, 2008
Replies: 35
Views: 2,691
Posted By dickersonka
One more thing, just in case they are behind a proxy, this might be better for getting the ip.

http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html
Forum: PHP Aug 26th, 2008
Replies: 35
Views: 2,691
Posted By dickersonka
Here's a link of how to get the ip address
http://www.plus2net.com/php_tutorial/php_ip.php

Then just set up table along the lines of

BLOCKED_IP
FAILED_LOGIN_ATTEMPTS
LAST_FAILED_TIME

When...
Forum: PHP Aug 25th, 2008
Replies: 35
Views: 2,691
Posted By dickersonka
Once again, hackers might keep trying the passwords, but you might want to try an approach of blocking ip's. 5 attempts at an ip with an incorrect password, record the ip in a table, and pull back...
Forum: PHP Aug 25th, 2008
Replies: 4
Solved: a href
Views: 556
Posted By dickersonka
A good way would be to include the parameters in the query string



<a href="www.thispage.com?county=Chaffee&state=Colorado"> Chaffee </a>
Showing results 1 to 31 of 31

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC