I am trying to learn PHP (just a tiny bit for a tiny project). I am trying to follow this tutorial, but when I do, it does not work. First of all I coppied the exact code there and it still did not work, but here is some of my code:
<?php
if($_POST['projectSubmit'] == "Submit")
{
$toApprove= $_POST['projectName'];
}
?>
<form action ="getData" method="post" >
<input type="text" name="projectName">
<input type="submit" name="projectSubmit" value="Submit">
</form>
Yet I get an error:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: projectSubmit
Filename: views/ViewProjectApproval.php
Line Number: 13
What am I doing wrong ?
BTW: Is this a correct way of transmitting data back to my controller ? (model view controller with code igniter)