PHP / MySQL / Forms - editing an exising record
Posted: Tue Aug 29, 2006 4:06 pm
Hello all. I have searched and browsed the forums for an answer to my question before deciding to post this. If I have passed over the answer unintentionally, I apologize, perhaps the answer to my question would simply be a link?
I am trying to edit records in a MySQL database. My insert record page is working fine, so is my view records and delete records pages. What I am having a problem with is with my edit record page. Following is the only part that isn't working:
I have also tried the following:
In every case, every record, whether $site="PWL" or $site="Both", are showing up with the "Both" button selected.
Does anyone know what my problem is? I would be very grateful for any assistance.
I am trying to edit records in a MySQL database. My insert record page is working fine, so is my view records and delete records pages. What I am having a problem with is with my edit record page. Following is the only part that isn't working:
Code: Select all
PWL ONLY:
<input type="radio" <?php if ($site="PWL") echo "checked='checked'" else echo "" ?> name="site" value="PWL">
Both sites:
<input type="radio" <?php if ($site="Both") echo "checked='checked'" else echo "" ?> name="site" value="Both">Code: Select all
PWL ONLY:
<input type="radio" <?php if ($row["site"]="PWL") {echo "checked='checked'";} else {echo "";} ?> name="site" value="PWL">
Both sites:
<input type="radio" <?php if ($row["site"]="Both") {echo "checked='checked'";} else {echo "";} ?> name="site" value="Both">Does anyone know what my problem is? I would be very grateful for any assistance.