Hi all,
I am fairly new to PHP and am stumped on a problem. I have a html table and I am trying to update information within it via php each time a button is pressed on the website. I have been able to display the number but it only increments once before it finishes. A for loop instead of isset incremented lots of times so i know it isn’t the arrays. Seems to be isset. Any clues how I can fix this?
Many thanks,
SC.
CODE:
[php]— working.php —
<?php if(isset($_POST['btn_submit'])) { $hnumb[0] = $hnumb[0] + 4; } else { //include ('startarrays.php'); } include ('carinfo.php'); include ('refresh.php'); ?>— carfinfo.php —
<?php $hname = array('Name', 'Numb',); $hcar = array("Audi", "Toyota",); ?>— refresh.php —
.tdtext { text-align: center; font-family: verdana; color: black} PHP TABLECAR LIST |
---|
' . $hname[$i] . ' | '; $i++; } ?>|
---|---|
'.' | '; echo ''.' | '; echo '
— startarrays.php —
<?php $hnumb = array("0", "0"); ?>[/php]