Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

MySQL Database Manager

by hacker_j99 (Beadle)
on Jul 24, 2001 at 00:22 UTC ( [id://99154]=CUFP: print w/replies, xml ) Need Help??

So far on my off time I have managed to create a simple database viewer that will allow you to view all entries in a database along with datbase and table names. Later updates will be a little more consise and will allow editing and removing data without having to know SQL..

(I dont know why you wouldnt know SQL but the university students seem not to know it)

http://www.eng.utoledo.edu/~hfranks/scripts/perl/newsort.txt


Hacker_J99
print(pack("h*","841636b6564602269702841636b65627f5a49393")."\n");

Replies are listed 'Best First'.
Re: MySQL Database Manager
by Anonymous Monk on Jul 24, 2001 at 17:19 UTC
    What?
    #Get the input from the calling html document #read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'}); #@params = split(/&/,$buffer);
    It does appear you learned that CGI.pm is better, so please remove those offensive comments ;)

    Also, since you're bothering to use CGI; instead of:

    print $cgi->header( "text/html" ); print qq~<HTML> <BODY>~; if ($header eq "yes"){ print qq~ <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html"> <TITLE>MySQL Database sorter.</TITLE> </HEAD> <BODY bgcolor="#FFFFFF"> <CENTER><H2>MySQL DataBase Sorter</A></H2> <br>~;
    use the CGI.pm equivalents to generate your html.
      I was thinking about using a key and token so that the perl script and the HTML is no longer interwoven and dependent... I have the script for that writen but havent combined the two..
      # The code included below is used by Campus Crusade for Christ # with permission of Alphalogic Systems, Inc. # No portion of this code made be used or replicated without # permission. # PrintHeader # # Returns the magic line which tells WWW that we're an HTML document + # if a cookie existes, it sets the cookie also sub PrintHeader { print "Content-type: text/html\n"; if ($gCookieValue ne "") { &SetCookies($gCookieName,$gCookieValue); print "\n"; } else { print "\n"; } } # # SendTemplate # # This subroutine is used to display a web page template and then add +information # onto that template. The information comes from the tokens created by + the # perl script. sub SendTemplate { my ($template)=@_; my ($key, $filecontents); open (FILE, "$template"); # opens file containing web page template if (eof(FILE)==1) { # If file doesn't open, provides a basic web page with an error me +ssage. # Then proceeds to post raw data onto the web page. &PrintHeader(); $key = '<!--#title#-->'; print "<HTML><TITLE>$gTokens{$key}</TITLE><HEAD></HEAD><BODY> <H2> +Sorry, There has been an error in calling the Template.</H2>"; print "<P><H2>The information you requested is listed below.</H2>" +; foreach $key (sort keys %gTokens){ print "$key","\t", $gTokens{$key},"<P>\n"; } print "</BODY></HTML>"; return; } # The following commands will dump everything in the web template fi +le into $filecontents undef $/; $filecontents=<FILE>; close FILE; $/ = "\n"; # This loop will search $filecontents and replace any tokens found w +ith the HTML code # that the token is associated with in the hash %gToken hash. foreach $key (sort keys %gTokens){ $filecontents=~s/$key/$gTokens{$key}/g; } &PrintHeader(); print $filecontents; return true; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://99154]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-26 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found