Php With User Interface

I am just starting out with PHP. I have resorted to doing some custom PHP programming because the plug-INs for a CMS I am using need a little customization.

The question I have is very simple and I am sure PHP programmers can answer this instantly. I have successfully declared a global PHP variable. All I need to know how to do for now is how to declare a button or a hyperlink or an input form element such that it can change the assignment of this variable.

I’m not quite sure what you mean here and think you may even have your idea backwards… Can you try explaining again or maybe go more in depth of what your trying to accomplish?

  1. Make sure your file ends .php i.e index.php
  2. Make sure your global variable is included. If its in another file, then on top of the file, type <?php include ‘whereeveritis.php’ ?>
  3. To use this outside the context of php you then need to try:
    <button><?php echo MY_GLOBAL_VAR ?></button>

When you’re form is submitted simply reassign the variable to the form field…

VARIABLE = $_POST[‘form_field’];