Ah, I see now. I went ahead and got the Forms plugin working and that
was really so easy to do. At least I know how to do it another way
now.

Thanks!

On May 17, 12:05 am, Jason Huck <[EMAIL PROTECTED]> wrote:
> If this code is verbatim, then I would say it's because your $.post()
> call does not include a "submit" param, which is what sendsuggest.php
> is checking for in order to process the submission.
>
> - jason
>
> On May 16, 7:59 pm, riscphree <[EMAIL PROTECTED]> wrote:
>
> > I've got a suggestion form that inserts into a db table when they
> > submit, my jquery is located in a /js folder, while this page is in /,
> > and my db settings are in /includes/
>
> > Here is my $.post
>
> > $.post("../sendsuggest.php",
> >                { subject: subjectVal, message: messageVal,
> > theusername: theUser  },
> >                   function(data){
> >                   $("#sendSuggestion").slideUp("normal", function()
> > {
>
> >                      $("#sendSuggestion").before('<h1>Success</
> > h1><p>Thank you for your comments!</
> > p>');
> >                   });
> >                   }
> >              );
>
> > sendsuggest.php is something like this
>
> > if(isset($_POST['submit'])) {
> >    $theuser = $_POST['theusername'];
> >    $subject = $_POST['subject'];
> >    $message = $_POST['message'];
> >    include("includes/database.inc");
> >    connect_to_cms();
> >    $sql = mysql_query("INSERT INTO suggestions(user,message,subject)
> > VALUES('$theuser', '$message', '$subject')");
>
> > }
>
> > On my page, the slideUp works and this line: $
> > ("#sendSuggestion").before('<h1>Success</h1><p>Thank you for your
> > comments!</p>');
>
> > works as well, but I can't figure out why it isn't inserting into the
> > db. Any hints?

Reply via email to