The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send values of input radio to database
#1
Hi everyone,

I'm trying to get the values from an input radio in the login form and send it to the database. This is my code in the form field:
<input type="radio" name="typeaccountpro" id="typeind"> An individual
<input type="radio" name="typeaccountpro" id="typepro"> A professional / An agency
What should I write in the script which will send everything to the database?
Also, for a select? A textarea? A checkbox?
Many thanks
  Reply
#2
You also need to assign values to your radio buttons.

You will do the same scripting as you would for any - including an input type text.

Same follows for select, textarea, and checkbox Smile
  Reply
#3
So like this for the input?
<input type="radio" name="typeaccountpro" id="typeind" value="<?php if (!$form_valid && !empty($_POST)){ echo $typeind;} ?>"> An individual
<input type="radio" name="typeaccountpro" id="typepro" value="<?php if (!$form_valid && !empty($_POST)){ echo $typepro;} ?>"> A professional / An agency

And like this for the script? http://pasted.co/328d5415
  Reply
#4
It's essentially the same as this video.
https://www.youtube.com/watch?v=Ls2NTY2mMHw
  Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)