![]() |
Problem with connecting MySQL using Perl CGI Script (DBI Package)
hi i am using the following code to connect to MySQL database but i am getting this error
Software error: Global symbol "$db" requires explicit package name at C:/Program Files/Apache Group/Apache2/cgi-bin/data.cgi line 16. Global symbol "$host" requires explicit package name at C:/Program Files/Apache Group/Apache2/cgi-bin/data.cgi line 17. Global symbol "$user" requires explicit package name at C:/Program Files/Apache Group/Apache2/cgi-bin/data.cgi line 18. Global symbol "$password" requires explicit package name at C:/Program Files/Apache Group/Apache2/cgi-bin/data.cgi line 19. Global symbol "$db" requires explicit package name at C:/Program Files/Apache Group/Apache2/cgi-bin/data.cgi line 21. Global symbol "$host" requires explicit package name at C:/Program Files/Apache Group/Apache2/cgi-bin/data.cgi line 21. Global symbol "$user" requires explicit package name at C:/Program Files/Apache Group/Apache2/cgi-bin/data.cgi line 22. Global symbol "$password" requires explicit package name at C:/Program Files/Apache Group/Apache2/cgi-bin/data.cgi line 23. Execution of C:/Program Files/Apache Group/Apache2/cgi-bin/data.cgi aborted due to compilation errors. code that is been used Code:
#!C:\perl\bin\perl.exeHTML Code:
<html> |
Re: Problem with connecting MySQL using Perl CGI Script (DBI Package)
Easiest solution, remove line "use strict;" and run.
|
Re: Problem with connecting MySQL using Perl CGI Script (DBI Package)
declare $db $user etc.. as
my $db my $user etc ... |
| All times are GMT +5.5. The time now is 19:28. |