troubleshooting Question

how to submit variable to a php page?

Avatar of saleemkhan
saleemkhan asked on
33 Comments1 Solution310 ViewsLast Modified:

hi all ,
  i am trying to fetch the data from a php page and
do the backend process in jsp page and then submit the result to php page. i am using URLConnection .

code in login.php

<form action="" method="post">
<input name="un" type="text">
<input name="pass" type="password">
<input type="submit" value="Submit">

code in process.jsp

String un=null;
                String pass=null;
                boolean result=false;
               if ("un1".equals(un) && "un1".equals(pass))
                  result =true;
                  String myurl=""+result;
                  URL u = new URL(myurl);
                  URLConnection yc= u.openConnection();
                 BufferedReader html = new BufferedReader(new InputStreamReader(u.openStream()));


            } catch (Exception e) {

                  out.print("There is a connectionproblem: " +e.getMessage());


code in result.php

echo "<br>";
echo "result=";
echo $_REQUEST['result'];
echo "<br>";

my problem is i am unable to print the result fetch from jsp.i think there is some problem in submitting the variable to a php page? am i in the right way? or guide me where i am wrong?

waiting for expert solution.?

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 33 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 33 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros