http - How do I trace the GET request from this html code? -
after hitting submit in filling below form,
<h1>our contact form</h1> <hr> <form action="process_form.php" method="get"> <p> title: <input type="radio" name="title" value="mr"> mr <input type="radio" name="title" value="mrs"> mrs </p> <p> first name:<br> <input type="text" size="15" name="first_name"> </p> <p> sur name:<br> <input type="text" size="15" name="surname"> </p> <p> gender: <select> <option value="select">select gender</option> <option value="male">male</option> <option value="female">female</option> </select> </p> <p> <input type="checkbox" name="newsletter"> subscribe news letter </p> <p> <input type="reset" name="reset" value="reset"> <input type="submit" name="submit" value="submit"> </p> </form>
syntax get: request-method-name request-uri http-version
how trace command request sent chrome browser? have option under f12 screen of chrome browser?
note: beginner
to trace http requests, check network tab in developer tools in chrome.
update: file-uploads, should use post instead of get. furthermore, need specify enctype="multipart/form-data"
on form.
see updated fiddle required changes: http://jsfiddle.net/79lk4ztf/1/
here's screenshot of post request made using form in fiddle. under "request payload" can see data in request, it's constructed when using multipart/form-data
how access data depends on server-side technology using. if using php, need use $_post['first_name']
first name , $_files['data']
access uploaded file.
if using asp.net, can use request.form["first_name"]
, request.files["data"]
access same information, respectively.
hope helps.
Comments
Post a Comment