473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Extracting parameters from an HTML page

Hi everyone,

I am rewriting a basic "email data to administrator" script to include an error check, which will ensure that all fields are filled with at least some data.

However, there is a problem (almost certainly a coding error on my part). I divided the script into subroutines to make it easier to understand and my logic seems to have stuffed up somewhere.

The code looks like this: Code Attached in program.pl.txt

What appears to be happening is that the parameters are NOT being read from the web page; when I put a line into the HTML page at the end to show the contents of $username, $address, $fullname and $sender, they all came up as blank (not undef, just blank).

So it seems that there is either a logic error or a script error.

The relevent part of the shtml page:

Expand|Select|Wrap|Line Numbers
  1. <form method="post" onsubmit="return checkform()" action="/cgi-bin/activate_v2.pl" >
  2.  
  3. <input type="hidden" id="ip" value="127.0.0.1" />
  4.  
  5. <p><table>
  6. <tr>
  7.     <td>Full Name:</td>
  8.     <td><input type="text" id="fullname" size="31" /></td>
  9. </tr>
  10. <tr>
  11.     <td>Street Address:</td>
  12.     <td><input type="text" id="address" size="31" /></td>
  13. </tr>
  14. <tr>
  15.     <td>Email Address:</td>
  16.     <td><input type="text" id="email" size="31" /></td>
  17. </tr>
  18. <tr>
  19.     <td>Website User Name: </td>
  20.     <td><input type="text" id="username" size="31" /></td>
  21. </tr>
  22. </table></p>
  23.  
  24. <p><button type="submit">Submit</button></p>
  25.  
  26. </form>
  27.  
The exact same HTML is used in the existing activation page, and the Perl is pretty similar too. What am I doing wrong?

Thanks!
David
Mar 22 '07 #1
4 1023
KevinADC
4,059 Expert 2GB
Saying only "there is a problem" is not helpful. We already know there is a problem otherwise you probably would not be asking a question. What is the problem and were is the problem?

Remove or comment out sections of your program until you narrow down the area of the problem. Few if anyone will want to look through your whole program and try and debug it for you.
Mar 22 '07 #2
True, and thanks. Can I have edit rights to my original post, please?

Thanks again!
David
Mar 23 '07 #3
KevinADC
4,059 Expert 2GB
Contact Miller, the forum moderator, by PM and ask him to remove your thread if that is what you would like to do.
Mar 23 '07 #4
miller
1,089 Expert 1GB
Hello David,

I've removed the code that your originally posted and included it as an attachment instead. (Note, you would not have been able to do this). I've also went ahead and removed your email address from your code as a secondary protection mechanism for you.

If you would like me to just delete this thread, let me know. For now, I agree with Kevin that most likely people are not going to want to take the time to actually read through that much content, even though most of it is html and formatting.

Nevertheless, next time make sure to remove your own email address and personally identifiable information so that spiders do not start spamming you.

Regards,
- Miller
Mar 23 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Astra | last post by:
Hi All Is there an ASP way of extracting the height and width of a swf file so that I can specify these dims when adding the whole OBJECT code to the web page? Thanks Robbie
3
by: DCB | last post by:
Hello. I have an easy question, likely, that has me in a headspin. I have an include file to a frames based site that basically forces frames on the end user if they visit the site and hit a...
1
by: Cognizance | last post by:
Hi gang, I'm an ASP developer by trade, but I've had to create client side scripts with JavaScript many times in the past. Simple things, like validating form elements and such. Now I've been...
3
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1...
3
by: news | last post by:
I am trying to get at the source of a web page. Looking at the innerHTML element is only part of the story. In IE, right-clicking on various different parts of the page gives me different results...
10
by: Adis | last post by:
Asp.Net Visual Studio 2003 SQL Server. Hi, Obtaining Data Based Upon Multiple Selections From a ListBox... I have database in Sqlserver and ListBox (Multiple Selection Mode) in my Visual...
2
by: Robert McEuen | last post by:
Sorry if this double-posts...Google doesn't do a very good job of communicating whether something has posted or not. Using Access 97, WindowsXP Is there a way to pass command line parameters...
6
by: sunil | last post by:
I have a button named Button1, and I wrote an event handler for the OnClick event. protected void Button1_Click(object sender, System.EventArgs e) { this.Response.Redirect("Default.aspx?q=" +...
3
by: Frank Potter | last post by:
There are ten web pages I want to deal with. from http://www.af.shejis.com/new_lw/html/125926.shtml to http://www.af.shejis.com/new_lw/html/125936.shtml Each of them uses the charset of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.