Back to Browse

Advance Practical PHP Create Category Table - video 124R

10 views
May 18, 2026
1:13:40

Before I proceed with this video. I needed to include the Bootstrap JavaScript. The dismissal functionality requires JavaScript. If you have the CSS but forgot the JS bundle, the button will appear but won't do anything when clicked. So I put the below line before the closing body tag. Summary of Data Flow 2. Key Adjustments Needed The Secret Key: You used the Site Key (6LdLZ...) in your HTML. In the PHP file, you must use the Secret Key provided by the Google reCAPTCHA admin console. The Input Name: Google automatically injects a POST variable named g-recaptcha-response into your form when the user clicks the checkbox. Your PHP script reads this specifically. 3. Handling the Javascript "Edit" Function Your dashboard.php has a Javascript function editItem() that creates a dynamic form. Because you have added a mandatory reCAPTCHA to the template, this JS function will now fail because it doesn't include the reCAPTCHA token. To fix this for the "Quick Edit" prompt: Move the reCAPTCHA div outside of the "Add New Item" form so it's globally available, or Recommended: Only enforce reCAPTCHA for the "Add New Item" form by checking if isset($_POST['Insert']) in your template. Modified Security Check (Selective reCAPTCHA): User clicks the reCAPTCHA checkbox in dashboard.php. Google sends a token to the browser. User clicks "Add Item"; the token is sent to masterTemplate.php as g-recaptcha-response. PHP sends that token + your Secret Key back to Google to verify. Google says "OK," and your PHP proceeds to run the INSERT query.

Download

0 formats

No download links available.

Advance Practical PHP Create Category Table - video 124R | NatokHD