MySQL Forums
Forum List  »  Perl

Re: Parsing URL/Form to grab ID for MySQL
Posted by: Randy Clamons
Date: March 14, 2011 12:05PM

Other than using double quotes where single quotes would work fine, your script looks like it should work. Are you sure you are filling values for $rndnum1 and $rndnum2?

Have you tried submitting the query as a straight html request, not ajax?

Here's my suggestion for a start on debugging:

use CGI;
my $cgi = CGI->new();
my $myid = $cgi->param("id");
print "QUERY_STRING: $ENV(QUERY_STRING}<br>\n"
print "myid: $myid<br>\b"; #this line isn't printing anything at all

Then paste into your address bar: http://www.mydomain.com/mysqlinsert.pl?id=5

Substitute the actual path and a valid id. If this works (you should see the entire query string), then try again with AJAX call.

Options: ReplyQuote


Subject
Written By
Posted
Re: Parsing URL/Form to grab ID for MySQL
March 14, 2011 12:05PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.