|
Posted by Steve on 10/17/06 15:38
"linda" <newsaccount@tiscali.co.uk> wrote in message
news:4534f78a_2@mk-nntp-2.news.uk.tiscali.com...
|
| ----- Original Message -----
| From: "Steve" <no.one@example.com>
| Newsgroups: alt.php
| Sent: Tuesday, October 17, 2006 4:16 PM
| Subject: Re: on input form showing error message for duplicate entry.
|
|
| >
| > "linda" <newsaccount@tiscali.co.uk> wrote in message
| > news:4533f42a$1_2@mk-nntp-2.news.uk.tiscali.com...
| > |I very new to php could someone please explain how to write an error
| > message
| > | into my AddNew.php below. id is set to unique so at the moment if
| > someone
| > | adds a product and the id is already in the database, it just doesn't
| > enter
| > | anything. Ideally I would like to display an error message, with a
back
| > | button to correct the id.
| > |
| > | So far I've tried running a SELECT query with an if statement prior
to
| > the
| > | INSERT but I just don't know enough php to get this to work. I would
be
| > | very greatful for any info and advice from those in this newsgroup.
| > |
| > | Many, many thanks in advance,
| > | Linda
| >
| >
| > linda,
| >
| > here's a basic maintenence script i have for managing "people"...forget
| > about the require_once files and just look at the programmatic flow.
| > you'll
| > need to change the db calls so that they are appropriate for your setup.
| > notice there is some validation in javascript but you also need to add
the
| > same validation in php since not all your visitors/customers will have
js
| > enabled. sorry for the text-wrapping. and contrary to the dipshit
comment
| > made by ikciu, this is NOT a stupid question at all.
| >
| > hth,
| >
| > me
|
| Many, many thanks Steve,
|
| I have just c&p'd your code into my editor to take a look at it! I'm very
| greatful to you for sharing this. I'm so new at this (three weeks new;-)
| that every step of changing my partners bussiness site from static to
| dynamic has been a true hurdle. Teaching yourself requires so much more
| work lol... but I'm getting there slowly. It's through kind help from
| people like yourself that I am able get anywhere at all. Though with that
| said, I have that "very proud of myself" feeling atm, that I've got as far
| as I have.
|
| No doubt I'll be back with more newbie questions, "watch this space!".
|
| Best wishes,
| Linda
not a problem. if you can fix the script that i posted to match your
environment, then altering it to maintain *any* data is pretty easily done
just by changing the values being received, the sql statements, validation,
and <input> fields. it is kind of a template, just not in the truest sense.
really, the only other tool you will probably need will be for reporting.
i've got samples for that as well including dynamic bar charts and line
graphs.
best of luck.
Navigation:
[Reply to this message]
|