Solved

CGI AND ASP

Posted on 1998-05-13
6
186 Views
Last Modified: 2013-12-25
I have two file welcome.html and chkpwd.asp
In the first file i have this code:
<FORM METHOD="POST"  ACTION="http//......................./cgi-bin/chkpwd.asp">
<INPUT TYPE="text" SIZE=20 NAME="Utente">
<INPUT TYPE="password" SIZE=20 NAME="password">
<INPUT TYPE="submit"  NAME="Send" VALUE="Procedi">
</FORM>
These parameters will go into stdin and PATH_INFO.
From the second file chkpwd.asp what is the function (like scanf(%s, stringa_input) c language)
to read the values of the parameters from stdin or  PATH_INFO variable ??
0
Comment
Question by:grafiti051398
[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
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1828428
Don't know ASP, but usually you read from stdin with fgets() from <stdio.h>, THEN process the read buffer. For env vars instead, you read with getenv() from <stdlib.h>.

HTH, julio
0
 

Author Comment

by:grafiti051398
ID: 1828429
Thanks, but I would like what is the function in ASP language.
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1828430
Oops! i believed ASP was but a protocol... one never stops learning :)

Good luck, julio
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 

Author Comment

by:grafiti051398
ID: 1828431
Edited text of question
0
 
LVL 28

Accepted Solution

by:
sybe earned 200 total points
ID: 1828432
Request.ServerVariables("PATH_INFO")

I use this ASP script often to test request variables from a form:
It shows ServerVariables, Form and Querystring variables


<TABLE BORDER=1 WIDTH=100%>

<TR>
      <TH COLSPAN=2> HTTP / Server Variables</TH>
</TR>


<TR>
      <TD><B>Server Variable</B></TD>
      <TD><B>Value</B></TD>
</TR>
      <% For Each name In Request.ServerVariables %>
<TR>
      <TD> <%= name %> </TD>
      <TD> <%= Request.ServerVariables(name) %> </TD>
</TR>

<% Next %>
</TABLE>

<P>&nbsp;</P>

<TABLE BORDER=1 WIDTH=100%>

<TR>
      <TH COLSPAN=2> Querystring</TH>
</TR>

<TR>
      <TD><B>Name</B></TD>
      <TD><B>Value</B></TD>
</TR>
      <% For Each name In Request.Querystring %>
<TR>
      <TD> <%= name %> </TD>
      <TD> <%= Request.Querystring(name) %> </TD>
</TR>

<% Next %>
</TABLE>


<P>&nbsp;</P>

<TABLE BORDER=1 WIDTH=100%>

<TR>
      <TH COLSPAN=2> Form Data</TH>
</TR>

<TR>
      <TD><B>Name</B></TD>
      <TD><B>Value</B></TD>
</TR>
      <% For Each name In Request.Form %>
<TR>
      <TD> <%= name %> </TD>
      <TD> <%= Request.Form(name) %> </TD>
</TR>

<% Next %>
</TABLE>

0
 

Author Comment

by:grafiti051398
ID: 1828433
Sybe, I have resolved my problem testing my code with your code.

Thanks Sybe
0

Featured Post

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

690 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