submit form via URL, is it possible?

cutiepie23

Senior Member
Joined
Aug 31, 2008
Messages
1,554
Reaction score
0
Hi
I am trying to submit this form via URL. When I enter in the URL which is this... http://abcdefghi.com/checked.php?action=put&id=5478 , it does not register. Pls help. below would be the coding.

the url is a fake url, i just use it to ask for help only.

<form method="POST" action="checked.php">
<input type="hidden" value="5478" name="ref">
<input type="submit" value="Click Here" style="width: 125px;">
</form>
 

XDeathLoRdz

Senior Member
Joined
Jun 27, 2010
Messages
511
Reaction score
0
You might want to put in more description in what you are trying to do.
From what you write it is very vague to understand what you trying to achieve.

Is there any error shown or result not coming out?
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,549
Reaction score
1,302
Hi
I am trying to submit this form via URL. When I enter in the URL which is this... ABCDEFGhi.com: The Leading Child Learning Site on the Net , it does not register. Pls help. below would be the coding.

the url is a fake url, i just use it to ask for help only.

<form method="POST" action="checked.php">
<input type="hidden" value="5478" name="ref">
<input type="submit" value="Click Here" style="width: 125px;">
</form>

Use method="GET" if you want the form variables to be on the URL instead of the body of the HTTP request. For POST, 2 encoding approaches are available, either "multipart/form-data" or "application/x-www-form-urlencoded"

It is recommended to use POST if you don't want the url be litter with request parameters, or you want to avoid implicit re-submission if user click BACK on the browser, or refresh the browser. Browser will normally alert the user if re-submission is intended for POST requests.

However, make no mistake, understand that POST is not more secure compared to GET.

Also the availability for 2 different mechanism of GET and POST makes good segregation of web client intention of the former is fetching information, and the latter is more for processing data(may also fetch data). Server side scripts can hence differentiate these 2 different requests and run a different flow of logics on the same script.
 
Last edited:

cutiepie23

Senior Member
Joined
Aug 31, 2008
Messages
1,554
Reaction score
0
XDeathLoRdz, I would need to do an increment of the count. therefore would need to use a url to perform this job, instead of clicking on the submit button.
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,549
Reaction score
1,302
davidktw, you mean i would need to retype the url, so that I would be able to use URL entry to input in the data into the "post" command?

like from this

ABCDEFGhi.com: The Leading Child Learning Site on the Net

To this?

ABCDEFGhi.com: The Leading Child Learning Site on the Net

If I get your question properly, you wanted to "simulate" the submission of the form by typing the URL you have given with the request parameters in the browser URL.

If that is the case, then you are doing it wrongly. Typing the URL with the request parameters is merely performing a HTTP GET request. The form you have provided is a POST request. You can't simulate a POST request in the browser normally.

You will need to use some extensions or plugin in browsers to do that.
For Google Chrome, you can use https://chrome.google.com/webstore/detail/simple-rest-client/fhjcajmcbmldlhcimfajhfbgofnpcjmb

For Firefox, try https://addons.mozilla.org/en-us/firefox/addon/poster/

If you know command line, you can use "curl".
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,549
Reaction score
1,302
XDeathLoRdz, I would need to do an increment of the count. therefore would need to use a url to perform this job, instead of clicking on the submit button.

Somehow I find your question rather confusing. Why not you show us your PHP codes, if you want any.
 

cutiepie23

Senior Member
Joined
Aug 31, 2008
Messages
1,554
Reaction score
0
If I get your question properly, you wanted to "simulate" the submission of the form by typing the URL you have given with the request parameters in the browser URL.

If that is the case, then you are doing it wrongly. Typing the URL with the request parameters is merely performing a HTTP GET request. The form you have provided is a POST request. You can't simulate a POST request in the browser normally.

You will need to use some extensions or plugin in browsers to do that.
For Google Chrome, you can use https://chrome.google.com/webstore/detail/simple-rest-client/fhjcajmcbmldlhcimfajhfbgofnpcjmb

For Firefox, try https://addons.mozilla.org/en-us/firefox/addon/poster/

If you know command line, you can use "curl".

ok thanks
Will try it.

Yes I would like to simulate the submission by typing URL.
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,549
Reaction score
1,302
ok thanks
Will try it.

Yes I would like to simulate the submission by typing URL.

To: cutepie23.

Correct me if I'm mistaken, you are trying to get more "exposure" to increment the count ? If that is the case, I suggest you spend more time providing better services for your online shop, you will get better exposure and more positive image vs a counter.

Let me advice you better in this area. If you want good 口碑 on your website, do more than just selling merchandise. What your customer will want is better services, recommendation on other similar products that they have bought, advertising campaign like giving discount during their birthday. Recommend them presents for their friends during their friend's birthday or anniversaries. These are the kind of initiative that a online shop should be doing to capture the heart of the customers.

Naturally your SEO and your rating will go up and hence more business for you. Simulating the ranking is a waste of time. You only capture your customer once and they will not go back if they find your service mediocre.

Also consider tapping on their social network such as twitter and Facebook and others. Give them credits if they recommend you to their friends and if their friends buy thru their recommend from you. Via facebook, ask for their permission to access their friend's list. In your system establish the relationship between them and create campaign like friends discount if you come together with you friends. Send out coupons that only work if they both buy together.

Entice your customers by giving them incentives. Make them feel at home that your service is targeting them. Let them rate(or like) your items so that others know which items are popular. Let your customer give comments, testimonial to your products.

If your products are good, eventually you will get more business. I hope this helps better than just clicking links :)

Cheers.
 
Last edited:
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top