PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Sofienne bahri <sofienne dot bahri at bell dot ca>
Subject: I NEED HELP
Date: Jan 8 1999 7:11PM

HELLO ,

I'm new using the library perl :CGI. I have a script which read a
textfile in a form and modify the records.The problem is that when i
submit my modified records, i can only read and print the 4first
element. using the command $q->param(variable_name) the others are empty
here is my script.
Any help would be appreciated.
#! /logiciels/perl/bin/perl
BEGIN{
         unshift(@INC, "/logiciels/perl/lib");
         unshift(@INC,  "/usagers/bsofienn/CGI/Sybase");
}


use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
$q= new CGI;
$database="/opt/http/bin/public/ordrejour.txt";
$databaset="/opt/http/bin/public/temord.txt";
$returnto= "http://csmcco.csrmtl.qc.bell.ca/secteur/schedule.htm";
$EXCLUSIVE =2;
$UNLOCK = 8;
&ReadRecord();
&modifypage();
if ($q->param(confirme) eq "1") {&modify_file(); print "MODIFICATION ";}
exit;


sub ReadRecord{

open (DB,"$database") or die "Error:$!\n";
while () {
push @results,$_;
}
close (DB);
}
sub modifypage{

($heurer,$dat,$adresse,$name,$name1,$name2,$name3,$name4,$name5,$name6,$name7,$name8,$name9,$name10,$name11,$name12,$name13,$name14,$name15,$name16,$name1
7,$name18)= split(/\|/,$results[0]);
print $q->header;
print $q->start_html(-title=>"Modification de l'ordre du
jour",-BGCOLOR=>'brown');
print $q->startform;
print <

Modification de l'ordre du jour


Coordonnes de la reunion

Heure:            Date:

Adresse:

LISTE DES ACTIVITES

 


Secteur Soutien et Surveillance
HTML } #sub print_message { #print $q->start_html(-TITLE=>'Ordre du jour Modifie', -BGCOLOR=>'Brown'); #print < # #
Ordre du jour modifie!
#
#
#

#

Retour a Ordre du jour. #
#

#


# #} sub modify_file { $q4=new CGI; $record = join '|',$q4->param(Heurer),$q4->param(dat),$q4->param(adresse),$q4->param(name),$q4->param(name1),$q4->param(name2); #chomp($record); open (DB,">>$databaset") or die "Error: $!\n"; flock DB, $EXLUSIVE; seek DB, 0, 2; print DB "$record\n"; flock DB, $UNLOCK; close(DB); #&print_message(); print $q->header; print $q->start_html(-title=>'Ordre du jour',-BGCOLOR=>'brown'); print "
Ordre du Jour Enregistre!

"; print "

Retour a :Ordre du jour
"; print $q4->param(name2); print end_html; }