Jump to content

z9z

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

z9z's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ah that's it "selected" thats new for me, didn't know that attributes exist I've tried it and it works well thanks. $selected = ($userValueFromDB==$option) ? ' selected="selected"' : ''; is that boolean expression the same right this ? if ($userValueFromDB==$option) $selected = "selected"; else $selected = ""; sorry again for stupid question. I rarely see boolean expression used. Anyway thanks for the help.
  2. hello guys, i am new around here. This forum seems fun and i'll try to be active around here while learning too My experience with php starts with simple forum editing and i found php are interesting. Never learn php from the scrath though. 5 years with php and all i've been doing are copy paste code that i found interesting. Build a couple of simple CMS for personal project. That's all, I hope i'll be active around here so i could gain knowledge lol
  3. Hey guys i am new around here and i need some help with php. So basically i want to make a submit form and i found a problem for myself here's some images to understand what i am talking about. so here's what i've made at first. This is meant for new data. <p><label>Status :</label> <select name="status" > <option value=""></option> <option value="Ongoing">Ongoing</option> <option value="Completed">Completed</option> </select> basically what I want is when I edit the data, that selection returns the value that was stored in the database rather than just null value. See image below to understand what i am trying to do. i dont really get how to do it with select. Please help me and thanks before. Sorry if my question was already asked before. Tried to search but didnt really found what i am looking for.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.