Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:55:04+00:00 2026-06-09T23:55:04+00:00

why does my ‘if if (isset($_POST[‘submit’])) not interact with mysql’ Please tell me, where

  • 0

why does my ‘if if (isset($_POST[‘submit’])) not interact with mysql’
Please tell me, where do I go wrong, I’ve been over this a thousand times and checked the internet… It’s a lot of code, but I think I have overseen something. I made the remarks for myself, so I would’nt forget something stupid as an “;”.
Thanks in advance

http://appsolute.vacau.com/cms

<html>
    <head>
    <title>Milan CMS</title>
    </head>

    <body>
    <?php
    mysql_connect("mysql15.000webhost.com", "a96443****tjiran", "ev****89") or die(mysql_error()); //opening database
    mysql_select_db("a9644326_app") or die(mysql_error());
    $result = mysql_query("select * from milan") or die(mysql_error()); //get msql database into $result
    $content = mysql_fetch_array ($result); // make $content represent current entry
    ?>

    <form action="<?php echo $PHP_SELF;?>" method="post" name="trainingen">
    <h3>Trainingen:</h3><p><textarea name="nametrainingen" rows="10" cols="60"><?php echo $content['value']; ?></textarea></p>
    <input type="submit" value="Verzenden"><input type="reset" value="Veld leeg maken">
    </form>

    <?php
    if (isset($_POST['submit'])) 
    { //test if submit button is clicked
        mysql_query("DELETE FROM milan WHERE tag='trainingen'") or die(mysql_error()); //delete old entry
        $input = $_POST['nametrainingen']; //set $input as current entry
        mysql_query("INSERT INTO milan (tag, value) VALUES ('trainingen', '$input')") or die(mysql_error()); //set tag, value as trainingen and $input(current entry)
        $result = mysql_query("select * from milan") or die(mysql_error()); //reset $result to new database
        $content = mysql_fetch_array ($result); //make $content represent new entry
        $myFile = "trainingen.json"; 
        $fh = fopen($myFile, 'w') or die("can't open file");
        fwrite($fh, json_encode($content));
        fclose($fh);
    }
    ?>
    <p>
    </body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:55:06+00:00Added an answer on June 9, 2026 at 11:55 pm

    $_POST is a super-global array that contains an associative array of all the form elements that were submitted with the form. You don’t have an input with name="submit", so your isset() fails.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does COUNT(*) have any significant impact for MySQL performance if query already has GROUP
Does anybody know why this function, when passed an invalid date (e.g. timestamp) to
Does anyone know how to make this code stop the knob from rotating past
Does this line of Perl really do anything? $variable =~ s/^(\d+)\b/$1/sg; The only thing
Does anyone know why this bean is getting instantiated multiple times? I only ever
Does anyone know how to add a border to a Dockpanel. i have this:
Does anyone know how can I replace this 2 symbol below from the string
Does this code get called for every object creation in Java, because every object
Does anyone know what this message means (or when it raises)? CFURLCopyResourcePropertyForKey failed because
Does anyone know a clean way to get near-LIFO or even not near-FIFO (e.g.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.