I am building a travel website where people can build up their travel itineraries.
There are pre built itineraries with cities and the users can click a button "Add to Itinerary" and this adds to the databse - this work fine.
I also want the opportunity for the user to add their own cities. The way I want to do this is by them clicking a button similar to "Add to Itinerary" but then they enter the name of this city and add to the list that way.
This is the code I have for the "Add to Itinerary" which is working.
<?php
if ( $_SESSION['user'] != "" ) {
if ( in_array("Bangkok", $aray) ) { ?>
<button class="buttonAddedItinerary">Already Added </button>
<?php
} else {
?>
<a href="process.php?action=addtoItinirary&UCty=Bangkok">
<button class="buttonAddItinerary">Add to Itinerary</button>
</a>
<?php
}
}
?>
So basically I want when I click the button:
<a href="process.php?action=addtoItinirary&UCty=USERINPUT"...