Using the following form to POST to the same page upon clicking submit:
<form action="" method="post"><a class="buttonnohover">
Enter URL: </a><input type="text" name="term2" class="buttonnohover"/>
<input type="submit" class="button" name="submit" value="Add URL" />
</form>
Top of the code then needs to call the form POST and append to existing array of URLs ($myUrls
) upon refresh. At the moment it just replaces the existing array value.
<?php
try
{
//URLs Array
$myUrls = array($_POST['term2']);
//Array Push for $myUrls
array_push($myUrls,$term2);
...
Not sure what is wrong?