Solved

bypassing lines

Posted on 1997-05-06
1
165 Views
Last Modified: 2013-12-25
:I am a beginner in cgi, and my question is that I created
the form, and I post it to a cgi script. For example I have
for address, three lines that they can fill out. I named
them "add1", "add2", and "add3". What happens is when the person filling out the form only fills out the first add1, and not the second and third, and I post it to the cgi, It places the extra lines on the next page. How do I get the cgi to skip thoselines and move up my next field.


               My cgi looks like:

               <h3>$input{'add1'}<br>
               <h3>$input{'add2'}<br>
               <h3>$input{'add3'}<br>
               $input{'city1'}, $input{'state1'}
               $input{'zip1'}</h3></center></b>

I want it to skip the "add2", and "add3", and bring up
the "city1" to just below the "add1". Right now it prints
the blank lines between "add1" and "city1". Thank you
in advance for your help.
0
Comment
Question by:richl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
mikem earned 0 total points
ID: 1827996
The following should work..

print "<h3>$input{'add1'}<br>\n";
if($input{'add2'}) {print "$input{'add2'}\n";}
if($input{'add3'}) {print "$input{'add3'}\n";}

Mike
0

Featured Post

Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question