Jump to content

Recommended Posts

I have a PHP webform, by filling the field and pressing submit you get to see a page with info from the mySQL database.

 

Can I submit the form by simply entering a URL with parameters?

 

Example:

http://www.domain.com/index.php?field=queryvalue

 

Best regards,

Ole

 

Link to comment
https://forums.phpfreaks.com/topic/133558-can-i-use-param-to-submit-a-form-by-url/
Share on other sites

Seems to use POST instead of GET. Can one just change method with no negative consequences, and then it works?

 

What exactly do you mean?  If you use GET you're passing variables via a URL and have to use the $_GET method to retrieve those values.  If you use POST then you have to submit your form somehow and use $_POST to retrieve all of your values.  Please read the basics.

So it seems I would need to do so re-prorgamming to make it work. The motivation for using a parameter to retrieve mySQL data is to monitor uptime. If there's another way, I could try an alternative way of monitoring uptime than to verify mySQL retrieved text on a web page.

 

I can monitor the web page and I could monitor the mySQL server port, but this might not catch some downtime situations as both web and mySQL server can be up, but for some reason the mySQL ouput is not showing on the web due to timeout etc.

Can you explain exactly what you're trying to do?  First you asked:

 

Can I submit the form by simply entering a URL with parameters?

 

Doesn't really even make sense, at least to me.  You can pass variables through the URL.  Now you're talking about up time and monitoring MySQL ports...  I'm lost  ???

I can monitor my php page, this is easy (a server checks the page every 5 minutes if a text string is on the web page). But I would like to monitor my php/mySQL system, this can be done if I monitor a URL which shows content from the mySQL database.

 

If I can use query parameters in the URL, instead of filling out the query form manually, that would display the database content so I can monitor uptime using a service like serviceuptime.com.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.