« first day (2181 days earlier)      last day (2764 days later) » 

9:13 PM
@MazharIqbalRana where's the PHP? that's all javascript
 
<div id="option-div">
<!--HARD CODED RADIO BUTTONS-->
<br /><label>Printer <input type="radio" id="printCheck" name="equip" value="Printer" onclick="javascript:radioCheck();"></label>
<label>Scanner <input type="radio" id="scanCheck" name="equip" value="Scanner" onclick="javascript:radioCheck();"></label>
<!--SHOWING RADIOS DYNAMICALLY -->
<?php
$connection = mysql_connect("localhost", "root", "");

//Selecting Database from Server
$db = mysql_select_db("mydb", $connection);

$query_eqp = mysql_query("SELECT * FROM radiobutton");
@Tiffany le me update question there
@Tiffany Updated

http://stackoverflow.com/questions/39883344/new-radio-button-not-clicked-but-old-can-be-clicked-ajax-php
 
@MazharIqbalRana On an unrelated note, use PDO, not MySQL functions.
 
@Tiffany OK fine but it is not the reason for radio to unchecked I think
 
No, it's not, but your MySQL connection is prone to vulnerabilities, so it's something you should look at rewriting.
What's your intended purpose? What is your ultimate goal with this?
adding radio buttons to a form...?
 
!!mysql
no, 'that wasn't
 
9:24 PM
fire the canon
 
@Tiffany Radio is added in client side and saved to db and shows ifPrint div on click But when one more radio created, its saved in db but does not get clicked. When I click it, previous created radio is selected always
 
I don't think it's worth the effort, @Ekin
 
yeah it seems
 
clicked as in checked?
is this like a form builder? I'm trying to understand why you're adding radio buttons on client side...
 
yes when i click it, its not checked and also not bringing my div
 
9:26 PM
@Tiffany this user has been told repeatedly that mysql_* functions are harmful and has ignored it
 
@Tiffany I want to create new equipment on button click on client side and this is radio i am creating showing a new div which has a form and insert options
 
new equipment?
like... inventory items?
define what you mean by equipment
 
Yes.. LIke Printer Scanner etc.
I have radio printer and on selecting printer, new div opens having form entering printer values. so, new radio clicked and any value entered like new equipment like suppose AC then div will open and form will be filled and entering values in db then
like this
 
okay, so like appliances and stuff
 
@Tiffany Yes exactly
 
9:31 PM
equipment is a very vague statement that can mean different things, depending on the context.
so that's why I was clarifying
 
Yes its actually an office equipment can be anything
 
alright
so after creating two radio buttons, is when the code breaks?
is there an arbitrary number that the code breaks at?
 
not two even I create four first created one is only checked and works others not even get selected
 
so after creating four radio buttons, the code breaks?
 
hi guys please can you help me with a cordova camera preview canvas thing?
 
9:35 PM
No no, I create raio on client side right? then i clicked it suppose its name is abc. it shows me ifprint div its fine now i created another one, previous radio named abc is selected and showing div and new one created is not selected even not getting clicked
 
If the Javascript room can't help you, why do you think we could?
 
hopeness
 
I'm a glutton for punishment and bored.
 
that some backend guys know something about it
 
and maybe I can learn something
@MazharIqbalRana try surrounding the dynamic portion in a div with an id set to whatever
then append the radio buttons to the div as children
 
9:39 PM
its already done here dynamically
<label><input type="radio" id="<?php echo strtolower($row['name']); ?>Check" name="radio-name" value="<?php echo $row['name']; ?>" ><?php echo $row['name']; ?> </label>
 
why do you have so many <br />s? you should be using CSS for that crap
it makes reading the code hellish
right, but in your code you have
 
<!-- THIS IS WHERE THE NEW RADIO BUTTONS WILL BE PUT     -->
   <input type="text" id="new-option" placeholder="Insert New Option">
   <input type="button" name="create" id="create" value="Create New Equipment">
you should surround that section with a div
<div id="created-radio-buttons"> then append the new radio buttons as children
 
hmm it doesnt make radio unchek i think
i did btw
 
where?
 
9:45 PM
now in code
on my pc
 
someone added a comment to your question, looks to be relevant
I can't see the problem, I'm chocking it up to javascript's fuckery
 
How can I let an exception run do what it would have done had I not caught it?
 
finally{ ... }?
 
as in.
Try{
//something
}Except(exception $e){
if($e->getCode == 12){
//Log and continue
} else {
//Halt execution as you would have normally.
}
}
No indentation?
 
chat is fucky with pasted code.
 
9:53 PM
@TomasZubiri Just rethrow the Exception: throw $e
 
adding four spaces prior to a line = adds line to multi-line code block, then you can indent after that. There's a key-command to automatically add the four spaces to a code block, but I forgot h ow
 
Thanks
 
time to use my shiny new batch automation script for backing up mysql database
squeeeee
 
10:19 PM
Code has to be prefixed with 4 spaces to format it.
$foo = 'bar';
if($foo) {
    // ...
}
 
 
1 hour later…
Wes
11:20 PM
where am i= what year is it
 

« first day (2181 days earlier)      last day (2764 days later) »