I am starting to get a handle (I think) on OOP. I was wondering if anyone would care to comment on what I think I understand:

For simplicity's sake class.php contains AddItem() and DisplayItems(). Since submitting form data

<?php
include('class.php');

If(!$_POST['submit']){ //Do I need to instantiate(?) $po everytime the page reloads?
$po = new PO;
}



If($_POST['submit']){ $po->AddItem(); }

<form action="$PHP_SELF" method="POST" >
...form fields and a submit button...
</form>

$po->DisplayItems();

?>

Is this a good basic methodology (aside from checking the form fields for valid characters).

Thanks,
Mike Smith

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to