Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Re: [Andy] adding an entry/add.cgi

Quote Reply
Re: [Andy] adding an entry/add.cgi In reply to
I added

use Data::Dumper;
print "Content-Type: text/html \n\n";
print "<pre>" . Dumper(%in) . "</pre>";


if (keys %in != 0) {

seems like there aren't any values actually being sent when using the following form

<FORM ACTION="$build_add_url" METHOD="POST" >
Complete the form below to add your listing. Please allow 48 hours for your listing to be indexed.<br><br>
<u><strong>Contact information:</strong></u><blockquote>
<table border = 0 bgcolor="#FFFFDF">
<tr><td valign=top><$font>Company/Organization:</font></td>
<td><INPUT NAME="Title" VALUE="$in{'Title'}" SIZE=25></td></tr>
<tr><td valign=top><$font>Contact Name:</font></td>
<td><INPUT NAME="Contact Name" VALUE="$in{'Contact Name'}" SIZE=25></td></tr>
<tr><td valign=top><$font>Website URL:</font><br><font size=2>(include the http://)</font></td>
<td><INPUT NAME="URL" VALUE="$in{'URL'}" SIZE=40></td></tr>
<tr><td colspan=2>Please suggest a <u><strong>directory category</strong></u>
that best describes your business or activity ( i.e. campground or adventure ).</td></tr>
<tr><td valign=top><$font>Category:</font></td>
<td><font size=2>~; $db_select_fields{'Category'} = join (",", &category_list); print &build_select_field ("Category", "$in{'Category'}"); print qq~</font></td></tr>
<tr><td valign=top><$font>Street or P.O. Box #:<font></td>
<td><INPUT NAME="Address" VALUE="$in{'Address'}" SIZE=25></td></tr>
<tr><td valign=top><$font>City, Prov/State:</font></td>
<td><INPUT NAME="CityProv" VALUE="$in{'CityProv'}" SIZE=25></td></tr>
<tr><td valign=top><$font>Zip or Postal Code:</font></td>
<td><INPUT NAME="PostalCode" VALUE="$in{'PostalCode'}" SIZE=25></td></tr>
<tr><td valign=top><$font>Phone:</font></td>
<td><INPUT NAME="Phone" VALUE="$in{'Phone'}" SIZE=25></td></tr>
<tr><td valign=top><$font>Fax:</font></td>
<td><INPUT NAME="Fax" VALUE="$in{'Fax'}" SIZE=25></td></tr>
<tr><td valign=top><$font>Email:</font></td>
<td><INPUT NAME="Contact Email" VALUE="$in{'Contact Email'}" SIZE=40></td></tr>
<p>Please enter a <u><strong>brief description</strong></u> of the service, program or
product offered in the space below, and include a <strong><u>short description</u></strong> of how we might find you in relation to the major highway systems in the province ( i.e. Route 2, off Highway #104, at
exit 18 ):<br>

<TEXTAREA NAME="Description" VALUE="$in{'Description'}" ROWS=8 COLS=60>$in{'Description'}</TEXTAREA></p>

<hr size=1 width=500 align=left>

when I change
<FORM ACTION="$build_add_url" METHOD="POST" > to <FORM ACTION="$build_add_url" METHOD="GET" > I get the following output

$VAR1 = 'URL';
$VAR2 = 'http%3A%2F%2Fwww.test.com';
$VAR3 = 'Contact Email';
$VAR4 = 'test%40test.com';
$VAR5 = 'PostalCode';
$VAR6 = 'Test';
$VAR7 = 'Address';
$VAR8 = 'Test';
$VAR9 = 'Title';
$VAR10 = 'Test';
$VAR11 = 'CityProv';
$VAR12 = 'Test';
$VAR13 = 'Phone';
$VAR14 = 'Test';
$VAR15 = 'Contact Name';
$VAR16 = 'Test';
$VAR17 = 'Description';
$VAR18 = 'Test';
$VAR19 = 'Category';
$VAR20 = 'Accommodation';
$VAR21 = 'Fax';
$VAR22 = 'Test';

and it gives the following error

There were the following errors trying to add your resource:

  • Contact Email (Invalid format)

Please fill out any missing fields and try again!

any other sugestions/help would be appreciated, let me know if you need more info. Thanks in advance
Subject Author Views Date
Thread adding an entry/add.cgi Johnny23 14866 Apr 26, 2012, 12:52 PM
Thread Re: [Johnny23] adding an entry/add.cgi
Andy 14530 Apr 27, 2012, 2:45 AM
Thread Re: [Andy] adding an entry/add.cgi
Johnny23 14525 Apr 28, 2012, 6:50 AM
Thread Re: [Johnny23] adding an entry/add.cgi
Andy 14513 Apr 28, 2012, 7:04 AM
Thread Re: [Andy] adding an entry/add.cgi
Johnny23 14504 Apr 28, 2012, 7:40 AM
Post Re: [Johnny23] adding an entry/add.cgi
Andy 14517 Apr 28, 2012, 10:01 AM
Post Re: [Johnny23] adding an entry/add.cgi
PerlFlunkie 13973 Aug 22, 2012, 9:10 PM