Re: strange problem (user poll)
| From: | Kevin Stone | Date: | Wed, 08 Jan 2003 23:38:54 +0000 |
| Subject: | Re: strange problem (user poll) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130821@lists.php.net to get a copy of this message | ||
I have no idea what I did but this email was not supposed to go to the
list.. my apologies. *LOL*
-Kevin
----- Original Message -----
From: "Kevin Stone" <kevin@helpelf.com>
To: <php-general@lists.php.net>
Sent: Wednesday, January 08, 2003 4:18 PM
Subject: Fw: [PHP] strange problem (user poll)
> vanway@vanwaytrophy.com
>
>
>
> It would help to know where $action is being defined.
> ----- Original Message -----
> From: "- [ Paul Ferrie ] -" <info@innovativedesigns.org.uk>
> To: <php-general@lists.php.net>
> Sent: Wednesday, January 08, 2003 3:43 PM
> Subject: [PHP] strange problem (user poll)
>
>
> > Can anyone see a problem in this? When i run the script i am getting
this
> > error "Notice: Undefined variable: action in
> > C:\www\Apache2\htdocs\user_poll\2\addpoll.php on line 13"
> >
> > <?
> > // addpoll.php
> > // Case Study 1: User Poll - Foundation PHP for Flash
> >
> > // If the form has been submitted...
> > (line 13) if ($action == "add") {
> > // Include config file
> > include('common.php');
> >
> > // Connect to database
> > $link = dbConnect();
> >
> > // Get date for new poll
> > $posted = time();
> >
> > // Build query to insert new poll
> > $query = "INSERT INTO polls (question, option1, option2, option3,
> > posted)
> > VALUES('$question', '$option1', '$option2',
> > '$option3',
> > $posted)";
> >
> > // Execute query
> > $result = @mysql_query($query);
> >
> > // If query failed...
> > if (!$result) {
> > // Display error
> > print "<font color=\"#ff0000\">Could not insert
> poll</font><br>\n";
> > } else {
> > print "<font color=\"#0000ff\">Poll
> > added</font><br>\n";
> > }
> >
> > mysql_close($link);
> > }
> > ?>
> > please anyone
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>