What method can I go about this code - Sending radio value and image to Database?

Posted 2 months ago by Ap3twe

I have images and input type radio allowing a user to select one image to the database. The user selects and I get the value. Working perfectly. Now I want to also send the image with the value to the database so I can retrieve the selected image and value to the user record.

This is how I am achieving it. It is part of a form.

<h3> Design Style </h3>
        <p> please select 1 from below </p>

        <li><img src="{{ asset('images/smileDesign0.png') }} " alt="Keep Same "><br><input type="radio" name="smile_design" value="KeepSame"></li>
        <li><img src="{{ asset('images/smileDesign1.png') }}" alt="Aggressive"><br><input type="radio" name="smile_design" value="Aggresive"></li>
        <li><img src="{{ asset('images/smileDesign2.png') }}" alt="Dominant"><br><input type="radio" name="smile_design" value="Dominant"></li>
        <li><img src="{{ asset('images/smileDesign3.png') }}" alt="Enhanced"><br><input type="radio" name="smile_design" value="Enhanced"></li>
        <li><img src="{{ asset('images/smileDesign4.png') }}" alt="Focused"><br><input type="radio" name="smile_design" value="Focused"></li>
        <li><img src="{{ asset('images/smileDesign5.png') }}" alt="Functional"><br><input type="radio" name="smile_design" value="Functional"></li>
        <li><img src="{{ asset('images/smileDesign6.png') }}" alt="Hollywood"><br><input type="radio" name="smile_design" value="HollyWood"></li>
        <li><img src="{{ asset('images/smileDesign8.png') }}" alt="Mature"><br><input type="radio" name="smile_design" value="Mature"></li>
        <li><img src="{{ asset('images/smileDesign9.png') }}" alt="Oval"><br><input type="radio" name="smile_design" value="Oval"></li>
        <li><img src="{{ asset('images/smileDesign10.png') }}" alt="Softened"><br><input type="radio" name="smile_design" value="Softened"></li>
        <li><img src="{{ asset('images/smileDesign11.png') }}" alt="Vigorous"><br><input type="radio" name="smile_design" value="Vigorous"></li>
        <li><img src="{{ asset('images/smileDesign12.png') }}" alt="Youthful"><br><input type="radio" name="smile_design" value="Youthful"></li> 

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.