You are here: Re: on input form showing error message for duplicate entry. « All PHP « IT news, forums, messages
Re: on input form showing error message for duplicate entry.

Posted by .:[ ikciu ]:. on 10/17/06 21:42

Hmm Steve <no.one@example.com> wrote:
> but hey, i can take your heat. at least mine is a response in concern
> and kindness...NOT CALLING ANYONE STUPID FROM THE GET-GO.

no sense to set these variables $action is enought with int value 1 add 2
edit and so on .... simple to validate and use

>
>> $id = isset($_REQUEST['id']) ?
>> $_REQUEST['id'] : 0;
>> $personFirstName = isset($_REQUEST['personFirstName']) ?
>> $_REQUEST['personFirstName'] : '';
>> $personMiddleName = isset($_REQUEST['personMiddleName']) ?
>> $_REQUEST['personMiddleName'] : '';
>
> PLACE. if you look further down the code, THIS is where i validate
> the data coming in...suck as the EMAIL address. what else IS there to
> validate, chump?

you call it validate :))))))))) don't laught me ... give me a url where do
you use this code and i will show you what you made :)

> you say this without knowing how my db::prepare() function work...you
> fucking tard! see, i told you you were a troll. besides depending on
> how my server is setup, i DON'T NEED TO STRIPSLASHES...nooby!

i wrote IF if you didn't see it

>> i preffer second type of insert much better - so hard to make
>> mistake, you store not encoded password - wrong for me
>
> thank GAWD i'm not doing things the way YOU prefer! lol. good
> programming in general is wrong for you!

do you think insert into () values () is better then insert into a=b ? or
you are a dumb or maybe you don't know this solution ???? i think so ...


> no mistakes that i see. wanna point them out in particular. you should
> peruse w3c specs before you answer, as it is ENTIRELY appropriate to
> have a css define an entity while using inline style to over-ride the
> base settings in the css for said entity...since one is applied after
> the other. nooby.

ofc it is possible but who use it? only you and your stupid team which
produce html for IE only?

>> good solution is pass form to this function -
>> onsubmit="validate(this)"
> a compliment? no fucking way!

ofc, when you will change name of form better way is to change X line of
code ... point for you



>>> if (warning.length == 0 && trim(el.value) == '')
>>> {
>>> warning = "FIRST NAME is required.";
>>> }
>>> var el = record.personLastName;
>>> if (warning.length == 0 && trim(el.value) == '')
>>> {
>>> warning = "LAST NAME is required.";
>>> }
>>> var el = record.personUserName;
>>> if (warning.length == 0 && trim(el.value) == '')
>>> {
>>> warning = "USER NAME is required.";
>>> }
>>> var el = record.personEmail;
>>> if (warning.length != 0 && !isEmail(el.value))
>>> {
>>> warning = "Invalid EMAIL.";
>>> }

> yes, i know what i wrote..fucking moron. YOU JUST DON'T UNDERSTAND
> IT. the part you snipped is the part that sets focus on the FIRST
> INCORRECT DATA ELEMENT SUPPLIED. i don't need to show ALL errors ALL
> at once...that is confusing for the user...not that USER EXPERIENCE
> CONCERNS YOU!

hehe, so good solution everytime check all fields - ppffff
if you will have one error then no sense to check rest - your stupid
function is running only on submit so it means at the end of function el
will remember last wron field - no more and it will selct it, checking rest
fields if one error occured is not important !!!!

> your limited imagination kills me! two fields may constitue the same
> error description one and or both may be at fault, thus generating
> said description. i simply want to show the error description once,
> you mindless cad!

ofc great solution pfff i will show you error handling if you want

>>> <td colspan="2">
>>> <input class="value"
>>> name="personRePassword"
>>> maxlength="255"
>>> type="text"
>>
>> again
>>
>
> again what? stripslashes are completely a matter of server
> configuration. or, didn't you know that?!!!

did you ever hear about type password ? lamer


> yeah, i usually use cursor:pointer since it jives in firefox...oh
> well, you actually made a valid point! big fucking deal. and just so
> you know, hand is an IE thing...POINTER is a w3c thing...so there HAS
> NEVER been a depreciation of ANYTHING. toad.

heheh if you dont know there is other cursor value which will show hand


>
>>> $lastSort = isset($_REQUEST['lastSort']) ?
>>> $_REQUEST['lastSort'] : '';
>>> $sort = isset($_REQUEST['sort']) ?
>>> $_REQUEST['sort']
>>>> 'LASTNAME';
>>> $sortDirection = isset($_REQUEST['sortDirection']) ?
>>> $_REQUEST['sortDirection'] : 'ASC';
>>> if ($sort == $lastSort){ $sortDirection = $sortDirection == 'ASC' ?
>>> 'DESC' : 'ASC'; }


excelent error handling :)

> again, i'm simply ASSIGNING the values to variables. validation is
> elsewhere. you should note how terribly consistant i am in
> methodology. see how that helps in code maintenance and
> understandability? oh well, probably not.


just use $lastSort=IM_LAMER in url and you will see :)

>>> $recordsPerPage = $_REQUEST['recordsPerPage'];
>>> if (!is_numeric($group)){ $group = 0; }
>>> if (!is_numeric($page)){ $page = 1; }
>>> if (!is_numeric($pages)){ $pages = 5; }
>>> if (!is_numeric($recordsPerPage)){ $recordsPerPage = 10; }
>>
>> totaly wrong 123.45 is numeric too so next code is totaly wrong too
>> .....
>
> you're an imbassil...run 123.45 through the algorythm and see if the
> math fails to work! idiot!

ofc you are totaly idiot i will show you:

$recordsPerPage = 10
$page = 3

what we will have? try to count

later use this value $recordsPerPage = -10
look at $range and try to run query with limt -X, Y

and look in the mirror and say IDIONT


$group = floor((($page - 1) * $recordsPerPage) /


>
>>> $sql = "
>>> SELECT COUNT(*) RecordCount
>>> FROM people
>>> ";
>>> unset($records);
>>> $records = $db->execute($sql);
>>> $recordCount = $records[0]['RECORDCOUNT'];
>>> $currentPage = $page;
>>> $group = floor((($page - 1) * $recordsPerPage) /
>>> ($recordsPerPage * $pages));
>>> $navigation = array();
>>> $page = $group * $pages + 1;
>>> $lastPage = $page + $pages;
>>> $maxPages = ceil($recordCount / $recordsPerPage);
>>> $range = ($currentPage * $recordsPerPage) -
>>> $recordsPerPage; if ($group)
>>>> style="border-bottom:1px solid lightsteelblue;
>>>> border-right:1px
>>> solid lightsteelblue; cursor:pointer; font-size:8pt;"
>>> title="Click to sort"
>>> onclick="document.location='<?= $_SERVER['PHP_SELF']
>>>> ?lastSort=<?= $lastSort ?>&sortDirection=<?= $sortDirection
>>>> &sort=LASTNAME'" >Last Name</th>

> if a user wants to fuck with the query string, let them. the results
> are simply what they are whether good or bad. it doesn't effect
> anything involving security or data integrity...which is my concern.
> you may happily fuck off now.


ofc, read my previous info say IDIOT AGAIN


>
>
>>> $sql = "
>>> SELECT Id ,
>>> FirstName ,
>>> MiddleName ,
>>> LastName ,
>>> UserName ,
>>> Email
>>> FROM people
>>> ORDER BY " . $sort . " " . $sortDirection . "
>>> LIMIT " . $range . ", " . $recordsPerPage . "
>>
>> db inssues for your code - means next error
>

> nope.

ofc

>
>>
>>> <a
>>> class="menuItem"
>>> href="<?= $_SERVER['PHP_SELF']?>?edit=1&id=<?=
>>> $record['ID']
>>>> " style="font-size:7.25pt; font-weight:normal;
>>> text-decoration:underline; white-space:nowrap;"
>>> title="EDIT [ <?= $description ?> ]"
>>> >Edit &#9655;</a>
>>> <br>
>>> <a
>>> class="menuItem"
>>> href="<?= $_SERVER['PHP_SELF']?>?edit=1&delete=1&id=<?=
>>> $record['ID'] ?>"
>>> style="font-size:7.25pt; font-weight:normal;
>>> text-decoration:underline; white-space:nowrap;"
>>> title="DELETE [ <?= $description ?> ]"
>>> >Delete &#9655;</a>
>>
>> here is your first error should be passed $action variable with int
>> value and then error handling
>
> no error...why not set this up on your server and try to make it blow
> up.

ok, i will show you - GIVE MA URL WHER I CAN FOUND IT AND I WILL CRASH IT IN
3 SEC

> you may fuck off now.

ofc GURU


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl

2be || !2be $this => mysql_query();

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация