{"id":361,"date":"2012-05-17T12:01:35","date_gmt":"2012-05-17T12:01:35","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=361"},"modified":"2025-11-16T11:01:50","modified_gmt":"2025-11-16T11:01:50","slug":"form","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/html\/forms-html\/form","title":{"rendered":".Form General"},"content":{"rendered":"\n<p>Simple form: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;form action=\"\/somepage.php\" method=\"POST\"&gt;\n    &lt;input type=\"hidden\" name=\"Action\" value=\"UpdateSettingsABC\" \/&gt;\n\n    &lt;p&gt;\n    &lt;label&gt;Enter Here&lt;\/label&gt;\n    &lt;input type=\"text\" name=\"Text1\" size=\"40\"  \/&gt;\n    &lt;\/p&gt;\n\n    &lt;input type=\"submit\" value=\"Send\" id=\"Send\" \/&gt;\n  &lt;\/form&gt;<\/code><\/pre>\n\n\n\n<p>Submit to same page, see <a href=\"\/cloud\/html\/forms-html\/submit-form-2\">here<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">onSubmit<\/h4>\n\n\n\n<p>\nE.g.\n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;form action=\"join.php\" method=\"post\" name=\"capform\" class=\"hover_inputs\" onSubmit=\"return capCheck(this);\"&gt;<\/code><\/pre>\n\n\n\n<p>onSubmit=&#8221;return capCheck(this);&#8221; means call the javascript function called&nbsp;capCheck <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;script>\n    function capCheck(theForm)\n    {\n    }\n  &lt;\/script><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">PHP Handle Form<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/\/------------------------\n  \/\/----- SAVE CHANGES -----\n  \/\/------------------------\n  if ( (isset($_POST&#91;'Action'])) &amp;&amp; ($_POST&#91;'Action'] == \"UpdateSettings\") )\n  {\n    $AdvertCreated = mysqli_real_escape_string($dblink, $_POST&#91;'AdvertExpires']);\n    $TerminalPhoneNumber = intval($_POST&#91;'AdvertCreated']);\n\n\n  }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Simple form: Submit to same page, see here onSubmit E.g. onSubmit=&#8221;return capCheck(this);&#8221; means call the javascript function called&nbsp;capCheck PHP Handle Form<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-361","post","type-post","status-publish","format-standard","hentry","category-forms-html"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=361"}],"version-history":[{"count":20,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/361\/revisions"}],"predecessor-version":[{"id":5173,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/361\/revisions\/5173"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}