Currently trying to write data from my dropdown menu to a field on my database. All the text fields are populating perfectly, but not sure why the drop down data isn't.
            Asked
            
        
        
            Active
            
        
            Viewed 38 times
        
    -1
            
            
        - 
                    3can you paste your code here? – The Beast Jan 04 '16 at 16:13
- 
                    1Your code should be posted as text within the question itself, not as an externally-linked image. – Kelly Keller-Heikkila Jan 04 '16 at 16:14
- 
                    There is no `name="returned"` in your html. You are using that in your php, which is why it fails. Add that to the `select` tag – Kamehameha Jan 04 '16 at 16:14
- 
                    and now to get my magnifying glass. Post text-based code and NOT an "image of". – Funk Forty Niner Jan 04 '16 at 16:16
- 
                    1and why did this question receive an upvote in the first place?? – Funk Forty Niner Jan 04 '16 at 16:16
2 Answers
0
            
            
        You have invalid syntax here.
$returned = $_POST['returned']; // This returns null.
You can always change your loans table of the $returned field to nullable.
OR, you can just fix it by replacing..
<select>
  <option value="No"> No </option>
  <option value="Yes"> Yes</option>
</select>
To
<select name="returned">
  <option value="No"> No </option>
  <option value="Yes"> Yes</option>
</select>
 
    
    
        choz
        
- 17,242
- 4
- 53
- 73
0
            
            
        Change your <select> tag to this
<select name="returned">
...
</select> 
you have to give the name of the parameter
 
    
    
        Karthic Rajakumar
        
- 86
- 7
