index_W

W

\W (nonword characters), regular expressions, 57

-w switch (warnings), Perl script, 17, 19

\w (word characters), regular expression, 202, 434

warn method, 24

warning switch, photo_dumper.pl, 288

warnings (-w) switch

catalog.cgi, 309

importance of, 17, 19

index.cgi, 185, 255

item_details.cgi, 312

report_graphic.pl, 332

report_html.pl, 327

report_text.pl, 324

score_test.cgi, 147

signup.cgi, 247

soap_server.cgi, 301

take_test.cgi, 141

test_chooser.cgi, 138-139

view_item.cgi, 195

Web form

filtering malicious user input, 111-113

hidden field, 115

poorly formatted compared to table-formatted, 110

Web-based auction application

auction table, 182

Bidding_Open subroutine, 199

bids table, 183-184, 214

bind_columns function, 188, 190, 193

CGI module, 185, 188, 196

Check_Data function, 199, 201

checking for text data, 202-203

closed_tmpl template, 199

connect method, 186, 189, 197

CREATE TABLE, 213

CURRENCY type, 203

database tables, 182-184

Date_Cmp function, 205

Date::Manip module, 205

DBI module, 185, 188, 196

disconnect function, 186

donor table, 182-183

double quote (qq) function, 211

DROP statement, 214

drop-down list, 184

Drop_Down_Item_List function, 186, 208

Drop_Down_List function, 189, 199

error key, 201

execute method, 208

Exporter module, 205

fetch function, 190

fetchrow_array function, 190, 212

filter key, 201

Get_Item_Detail function, 197, 211

Get_Item_Table function, 189-190, 213

header function, 186, 190, 198

@INC array, 185, 196

index.cgi page, 184

index.tmpl, 187

Is_Bidding_Open function, 207-208

item table, 183, 214

join function, 199

lib method, 185, 188

MAX function, 212

namespace, 204

overview, 181

page, 187, 195

Page_Header function, 186, 190, 198, 206

Page_Print function, 195

param function, 196

PATH environment variable, 186, 188-189, 197

PHONE type, 203

prepare method, 208

Print_Page subroutine, 187, 190, 200, 205, 207

push function, 212

quote word (qw) function, 210

required key, 201

SELECT statement, 208

shift function, 206, 211

SmallAuction module, 185, 188, 196

sprintf function, 191, 198

strict module, 185, 196

Submit_Bit function, 200

subselect, 213-214

substr function, 191

taint switch, 185, 188, 195

template file, 186

TMPL file handle, 206

UnixDate function, 205

value key, 201

warnings switch, 185, 188, 195

Web-based catalog system

books database, 302

_callback function, 306-307

Catalog package, 301-302

catalog.cgi, 310

Catalog::input variable, 304, 306

<catalog_item> XML tag, 305

CGI module, 309, 312

DBI module, 301

die function, 304

disconnect, 305

execute method, 303

GET, HTML, 312

_get_image subroutine, 304, 306

Get_Product_Data function, 303, 312

Get_Products_List method, 302, 309

handle method, 302

header function, 309, 312

here document, 310, 314

HTML::LinkExtor module, 301, 306

item_details.cgi program, 310

LWP::Simple module, 301

LWP::Simple::get($url), 306

mysql driver name, 302

namespace, 301, 312

output, 308

overview, 308, 311

param function, 312

parse method, 306

product page, 311

regular expression, 305

results method, 309

SOAP::Lite module, 302, 309, 312

SOAP::Transport::HTTP module, 301

strict module, 301, 309, 312

switch.perlguy.net server name, 302

taint switch, 309, 312

warnings switch, 301, 309, 312

XML document reference, 313

XMLin function, 313

XML::Simple module, 312

Web-based phonebook application

add record HTML page, 116-117

Add_Record subroutine, 118, 123

bind_columns method, 121-122

CGI module, 118

CGI::Carp module, 118

CGI.pm module, 118

$DB_Handle, 118

Display_Page subroutine, 124

Display_Results subroutine, 120-121

exit function, 126

fatalsToBrowser method, 117

Handle_DB_Error subroutine, 124

header function, 118

here document, 121

hidden field, 118

join function, 120

main HTML page, 114-115

map function, 119

No_Data subroutine, 122-123

overview, 114

param function, 118-119

prepare method, 120

program listing, 165-168

Search_DB subroutine, 118-119

SQL statement, generating, 120

strict module, 118

taint mode, 117

undef, 121-122

Web-based photo album application

Add_Album subroutine, 429

album table, 446

BasicSession module, 442

CGI module, 442

connect function, 429

DBI module, 427, 442

die function, 429

dim function, 427

fetch function, 453

fetchrow_array function, 449

fetchrow_hashref function, 446, 452

File::Copy module, 427

File::Find module, 427

find function, 429

Get_Details subroutine, 450

get_image function, 447

get_image subroutine, 453

Get_Photo_List subroutine, 448, 450

Get_Session function, 442

image metadata, writing to JPEG file, 429

image_info function, 427

Image::Info module, 427

Imager module, 427

lib module, 442

List_Albums subroutine, 444

Make_Sizes subroutine, 443-444

mkdir function, 429

output, 438-441, 455-456

overview, 425-426, 454

photo album files, absolute path, 428

photo table, 446

prepare method, 448

Print_Page subroutine, 445, 448

SELECT statement, 446, 451

shift function, 429, 450

Show_Album subroutine, 444, 446, 458-459

Show_Photo subroutine, 443

strict module, 427, 442

taint switch, 427

unshift function, 450

UPDATE statement, 457

Update_Data subroutine, 457

Wanted subroutine, 429

warning switch, 427

Web-based quiz program

Add_Question function, 135, 162

admin.html, 128

answers table, 126

Content-Type header, 131

cookie function, 143, 147

correct input box, 134

create_test.html, 128-129

DBI module, 151

execute method, 152, 156, 162

Exporter module, 151

fetch method, 154

fetchall_arrayref method, 157

fetchrow_hashref function, 140, 159

fisher_yates_shuffle subroutine, 145, 160

Get_Question function, 143-144

Get_Test_Config function, 134, 142, 148, 161

Get_Test_List function, 140, 152

header function, 131, 135, 140, 148

here document, 132, 136-138, 140-141, 144-146, 148

hidden variable, 144

index.html, 127

last function, 158

map function, 157

my variable, 131

MySQL database, 126

mysql_insertid function, 131, 163

namespace, 151

No_More_Questions subroutine, 158, 161

overview, 126-127

param function, 142, 148

prepare method, 162

program listing, 168-180

qq block, 136, 145

Qtext input box, 134

questions table, 126

qw command, 134

running, 150

Score_Test function, 148

Score_Test subroutine, 152-155

score_test.cgi program, printing link to, 161

shift function, 155-156

split statement, 153

sprintf function, 155

SQL statement execution, 159

$sth_getlist handle, 152

strict module, 130, 133, 139, 142, 147

taint switch, 130, 138-139, 141, 147

test_config table, 126

use statement, 133, 139

warnings switch, 138-139, 141, 147

Web-based shopping cart program

BasicSession module, 398, 401, 405

Calc_Price function, 407

cart_total.tmpl template, 408

catalog listing, 397

catalog_footer.tmpl template, 400, 408

catalog_header.tmpl template, 407

CGI module, 401, 405

Get_Product_Data function, 402

Get_Product_List method, 406

Get_Products_List method, 399

Get_Session function, 398, 405

Get_Session module, 401

output, 404

overview, 395-396, 403

param function, 398, 402, 406

Print_Page function, 398-399, 403, 407-408

qq block, 400

result method, 399, 402

SOAP::Lite module, 398, 401, 405

soap_server19.cgi, 399, 406

sprintf function, 408

strict module, 397, 401, 405

XMLin function, 403

XML::Simple module, 401

weekly report, 325

WHERE clause, SELECT statement, 41-42

WHERE statement, report_graphic.pl, 335

while loop, 22, 40, 157

wildcard, Structured Query Language (SQL), 120

window title, 87

Windows 95, 481

Windows 98, 79, 481

Windows 2000, 481

Windows installation

Apache, 487-491

DataBase Interface (DBI), 497-498

MyODBC, 499-502

MySQL, 493-496

Perl, 482-486

withdraw function, 83, 85, 91

World Wide Web Consortium, 105

wrap attribute, <textarea> tag, 109

Wrap_Page function

index.cgi, 256

signup.cgi, 251

Wrap_Page subroutine, BasicSession.pm, 265

Writing CGI Application With Perl (Addison Wesley), 105, 113



Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net