So, I am trying to work on some PHP for classes, but am running into an issue with the above notice. The code is:
<select name="RAM" id="RAM" style="grid-column: 2/ span 3; grid-row:8;">
<?php foreach ($RAM as $row): ?>
<option><?=$row["name"]?></option>
<?php endforeach ?>
</select>
<label style="grid-column:5; grid-row:8">
<?php showPrice($_POST["RAM"])?>
</label>
<select name="Storage" id="Storage" style="grid-column: 2/ span 3; grid-row:9;">
<?php foreach ($STORAGE as $row): ?>
<option><?=$row["name"]?></option>
<?php endforeach ?>
</select>
<label style="grid-column:5; grid-row:9">
<?php showPrice($_POST["Storage"])?>
</label>
The errant section is the one labeled "RAM", which produces the error notice. I've tried echoing the $_POST to see if it gets the name of the selected item correctly. I've used the name within the SQL database to see if something was wrong with the names between the two.
But both of those do return the proper value I need, and the "Storage" section above does work as intended, so I can't quite tell what's causing it.
Aucun commentaire:
Enregistrer un commentaire