Nick, how do I do that in an insert statement? I am lost):!
--- Nick Vettese <[EMAIL PROTECTED]> wrote: > It may be a little extra code, but you can set it up > to keep your current variables as well. Just do a > > $firstname = $_POST['firstname']; > $lastname = $_POST['lastname'[; > etc... > > nick > > Nick Jones <[EMAIL PROTECTED]> wrote: Check > your php.ini file and see if "Register Globals" > is turned on or not. It seems to me that your > variables aren't populated with anything because > the > register globals switch is off. You have two > options: > turn on register globals (not usually a good idea), > or > change your variable names from $firstname, > $lastname, > etc. to $_POST['firstname'], $_POST['lastname'], > etc. > > LMK if this works. > Thanks and HTH!, > -Nick > > --- "D. K. Wema" <[EMAIL PROTECTED]> wrote: > > > I counter checked and found no mis-typing. > > > > -- > > dk wema > > > > --- Nick Vettese <[EMAIL PROTECTED]> wrote: > > > > > If the code goes through when the VALUES are > hard > > > coded, it probably means that the strings are > > > mis-typed. > > > > > > nick > > > > > > Ian Bambury <[EMAIL PROTECTED]> wrote: > As > > you > > > say, it would appear that you have a problem > > > elsewhere and that this > > > code is not being executed at all. > > > From what you have posted, the script must be > > > dying in dbconnect.php > > > If you'd like to post that, I'll have a look. > > > Ian > > > > > > On 18/11/05, D. K. Wema <[EMAIL PROTECTED]> > > wrote: > > > > > > > > I am sorry, Ian, I'm quite new in this. OK, > I > > > tried > > > > echo $sql; but got no output. However, when > I > > > used the > > > > hardcoded insert without using the form, I > got > > > the > > > > following output: > > > > > > > > Information entered into address book. > > > > > > > > INSERT INTO addressbook (firstname, > lastname, > > > cpeyear, > > > > city, country, workplace, email, comments) > > VALUES > > > > ('Peter','Long','1986','Leeds','United > > > > Kingdom','Wallmart,'[EMAIL PROTECTED]','We > just > > > echoed > > > > the field information into the value > attribute > > of > > > the > > > > each element, which was fairly easy') > > > > > > > > > > > > I suspect that the error could be somewhere > in > > my > > > > form, but I cannot get it. > > > > > > > > -- > > > > dk wema > > > > > > > > --- Ian Bambury <[EMAIL PROTECTED]> > wrote: > > > > > > > > > What I meant was, can you put a line in > of: > > > > > echo $sql; > > > > > and see what you get > > > > > > > > > > > > > > > > > > > > __________________________________ > > > > Yahoo! FareChase: Search multiple travel > sites > > in > > > one click. > > > > http://farechase.yahoo.com > > > > > > > > > > > > Community email addresses: > > > > Post message: php-list@yahoogroups.com > > > > Subscribe: > [EMAIL PROTECTED] > > > > Unsubscribe: > > [EMAIL PROTECTED] > > > > List owner: [EMAIL PROTECTED] > > > > > > > > Shortcut URL to this page: > > > > http://groups.yahoo.com/group/php-list > > > > > > > > > > > > > > > > SPONSORED LINKS > > > > Php > > > > > > > mysql<http://groups.yahoo.com/gads?t=ms&k=Php+mysql&w1=Php+mysql&w2=Job+postings&c=2&s=33&.sig=FLGkJVBUdDMln4PBO26sng> > > > Job > > > > > > > > > > > postings<http://groups.yahoo.com/gads?t=ms&k=Job+postings&w1=Php+mysql&w2=Job+postings&c=2&s=33&.sig=cV3rp9pSpCxahJy7imon_w> > > > > ------------------------------ > > > > YAHOO! GROUPS LINKS > > > > > > > > > > > > - Visit your group > > > > "php-list<http://groups.yahoo.com/group/php-list>" > > > > on the web. > > > > - To unsubscribe from this group, send > an > > > email to: > > > > > > > > > > > [EMAIL PROTECTED]<[EMAIL PROTECTED]> > > > > - Your use of Yahoo! Groups is subject > to > > the > > > Yahoo! Terms of > > > > Service > <http://docs.yahoo.com/info/terms/>. > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > [Non-text portions of this message have been > > > removed] > > > > > > > > > > > > Community email addresses: > > > Post message: php-list@yahoogroups.com > > > Subscribe: > > [EMAIL PROTECTED] > > > Unsubscribe: > > > [EMAIL PROTECTED] > > > List owner: [EMAIL PROTECTED] > > > > > > Shortcut URL to this page: > > > http://groups.yahoo.com/group/php-list > > > > > > > > > > > > SPONSORED LINKS > > > > > > > > > Php mysql > > Job > > > postings > > > > > > > > > > > > --------------------------------- > > > YAHOO! GROUPS LINKS > > > > > > > > > Visit your group "php-list" on the web. > > > > === message truncated === __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/HKFolB/TM --------------------------------------------------------------------~-> Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/