Click here to Skip to main content
15,888,454 members
Home / Discussions / Web Development
   

Web Development

 
QuestionYears in Descending Order Pin
Jassim Rahma26-Oct-13 0:53
Jassim Rahma26-Oct-13 0:53 
AnswerRe: Years in Descending Order Pin
Richard MacCutchan26-Oct-13 21:42
mveRichard MacCutchan26-Oct-13 21:42 
GeneralRe: Years in Descending Order Pin
Jassim Rahma26-Oct-13 22:54
Jassim Rahma26-Oct-13 22:54 
Questionplaceholder even if focus Pin
Jassim Rahma26-Oct-13 0:49
Jassim Rahma26-Oct-13 0:49 
QuestionI want to display the xml content differentiating the docs by fields names and values any help please.. Below is my xml file content.. Pin
Indudhara26-Oct-13 0:17
Indudhara26-Oct-13 0:17 
Questionenable / disable combobox using checkbox Pin
Jassim Rahma25-Oct-13 10:04
Jassim Rahma25-Oct-13 10:04 
AnswerRe: enable / disable combobox using checkbox Pin
Santosh K. Tripathi25-Oct-13 22:42
professionalSantosh K. Tripathi25-Oct-13 22:42 
Questionread bit value into checkbox in PHP Pin
Jassim Rahma25-Oct-13 2:48
Jassim Rahma25-Oct-13 2:48 
Hi,

I am having difficulties reading the bit value from MySQL and showing it in a checkbox in PHP.

The value is not showing and it's always unchecked!

This is what I am using:

PHP
$mysql_command = "CALL sp_get_member_personal_information(:param_member_guid)";

$mysql_query = $mysql_connection->prepare($mysql_command);
$mysql_query->bindParam(':param_member_guid', $_SESSION["member_guid"], PDO::PARAM_STR);

$mysql_query->execute();

$mysql_row_count = $mysql_query->rowCount();

if ($mysql_row_count <= 0) { exit(header("Location: home")); }

while ($mysql_row = $mysql_query->fetch())
{
    $is_private = (bool)$mysql_row["is_private"];
    $hide_contact_details = (bool)$mysql_row["hide_contact_details"];
}	


and then:

PHP
<input type="checkbox" id="chkPrivateProfile" name="chkPrivateProfile" value="<?php echo $is_private; ?>"> My Profile is Private<br><br>
<input type="checkbox" id="chkHideContactDetails" name="chkHideContactDetails" value="<?php echo $hide_contact_details; ?>"> Hide my contact details<br><br>                    

I have no problem reading a varchar value but my problem is juts with the bit as it's my first time trying checkbox with php.

Please help...

Thanks,
Jassim[^]


Technology News @ www.JassimRahma.com

QuestionDynamic Data Scaffolding with static values Pin
vkEE24-Oct-13 9:39
vkEE24-Oct-13 9:39 
QuestionDynamic questionnaire Pin
vkEE24-Oct-13 8:00
vkEE24-Oct-13 8:00 
Questioninc or php for include files? Pin
Jassim Rahma23-Oct-13 23:53
Jassim Rahma23-Oct-13 23:53 
Questionread the text of <select> instead of value Pin
Jassim Rahma23-Oct-13 0:47
Jassim Rahma23-Oct-13 0:47 
Questionadd http to input box Pin
Jassim Rahma23-Oct-13 0:43
Jassim Rahma23-Oct-13 0:43 
QuestionHow To Save Google map as image Pin
Jak Anil22-Oct-13 20:26
Jak Anil22-Oct-13 20:26 
QuestionMultiple Selection Dropdown : Ordered list + JAVASCRIPT Pin
Member 1035161121-Oct-13 23:39
Member 1035161121-Oct-13 23:39 
AnswerRe: Multiple Selection Dropdown : Ordered list + JAVASCRIPT Pin
Wombaticus22-Oct-13 2:43
Wombaticus22-Oct-13 2:43 
QuestionInteractive coloring page in HTML5 Pin
azjudy21-Oct-13 6:26
azjudy21-Oct-13 6:26 
QuestionScaffolding with Self referential Table in MVC Pin
nooshin21-Oct-13 0:57
nooshin21-Oct-13 0:57 
Questiondatepicker problem Pin
Jassim Rahma20-Oct-13 3:27
Jassim Rahma20-Oct-13 3:27 
Questionbest way to use webservices? Pin
Jassim Rahma19-Oct-13 8:38
Jassim Rahma19-Oct-13 8:38 
AnswerRe: best way to use webservices? Pin
Ali Al Omairi(Abu AlHassan)19-Oct-13 22:03
professionalAli Al Omairi(Abu AlHassan)19-Oct-13 22:03 
GeneralRe: best way to use webservices? Pin
Jassim Rahma20-Oct-13 2:57
Jassim Rahma20-Oct-13 2:57 
GeneralRe: best way to use webservices? Pin
Ali Al Omairi(Abu AlHassan)20-Oct-13 9:41
professionalAli Al Omairi(Abu AlHassan)20-Oct-13 9:41 
Questionwhich <title> is better for SEO Pin
Jassim Rahma19-Oct-13 2:58
Jassim Rahma19-Oct-13 2:58 
AnswerRe: which <title> is better for SEO Pin
thatraja19-Oct-13 3:18
professionalthatraja19-Oct-13 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.