• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get the data from a form like it would be a Servlet but using php

 
Isaac Ferguson
Ranch Hand
Posts: 1028
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I need to get the data from a form like it would be a Servlet but using .PHP

Could someone tell me if that is possible and how to do it please?

Regards, Isaac
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make a HTML form

Make a PHP file with $_POST for those variables.

Voila
 
Isaac Ferguson
Ranch Hand
Posts: 1028
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This what I made:




I cant test it, because I have to access to a running server. How it looks?


 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You know your HTML form says POST and your PHP using $_GET. Surely if you do run it, you won't get anything. These 2 need to match.

Other than that, the form looks alright

You can download and install Apache and PHP and test it locally.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic