Checkbox Not Registering In Database
I am using the code:
<input type="checkbox" name="noalert">
on the HTML form and then saving it to the database. The data type is INT, but the value saved is always 0, whether the user ticks the box or not. I thought it would be 1 if ticked and 0 if not?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Checkbox Data In The Database
I want to display the checkboxes taken from the database from table “const_skills”, but the checkboxes and its values do not appear ($html_skills). Can anyone figure this out. Below is the codes that I’ve been using. Thanks in advance. <?php include "dbinfo.php3"; function get_checkbox_labels($table_name) { /* make an array */ $arr = array(); /* construct the query */ $query = "SELECT * FROM $table_name"; /* execute the query */ $qid = mysql_query($query); /* each row in the result set will be packaged as an object and put in an array */ while($row= mysql_fetch_object($qid)) { $array[count($arr)] = $row; } return $arr; } /* Prints a nicely formatted table of checkbox choices. $arr is an array of objects that contain the choices $num is the number of elements wide we display in the table $width is the value of the width parameter to the table tag $name is the name of the checkbox array $checked is an array of element names that should be checked */ function make_checkbox_html($arr, $num, $width, $name, $checked) { /* create string to hold out html */ $str = ""; /* make it */ $str .= "<table width="$width" border="0">n"; $str .= "<tr>n"; /* determine if we will have to close add a closing tr tag at the end of our table */ if (count($arr) % $num != 0) { $closingTR = true; } $i = 1; if (isset($checked)) { /* if we passed in an array of the checkboxes we want to be displayed as checked */ reset($arr); while (list(, $ele)=each($arr)) { $str .= "<td><input type="checkbox" name="$name" value="$ele->id""; reset($checked); while (list(, $entry)=each($checked)) { if ($entry == $ele->id) { $str .= "checked"; continue; } } $str .= ">"; $str .= "$ele->value"; if ($i % $num == 0) { $str .= "</tr>n<tr>"; } else { $str .= "</td>n"; } $i++; } } else { /* we just want to print the checkboxes. none will have checks */ reset($arr); while (list(, $ele)=each($arr)) { $str .= "<td><input type="checkbox" name="$name" value="$ele->id">"; $str .= "$ele->value"; if ($i % $num == 0) { $str .= "</tr>n<tr>"; } else { $str .= "</td>n"; } $i++; } } /* tack on a closing tr tag if necessary */ if ($closingTR == true) { $str .= "</tr></table>n"; } else { $str .= "</table>n"; } return $str; } /* get the checkbox labels */ $skills = get_checkbox_labels("const_skills"); /* create the html code for a formatted set of checkboxes */ $html_skills = make_checkbox_html($skills, 3, 400, "skills[]",$checked); ?> <html> <body bgcolor="#ffffff" text="#000000" id=all> <br> <form name="skills" method="POST" action="insertskills.php3"> Check off your web development skills: <? echo "$html_skills"; ?> <br> <br> <input type="submit" value="Submit"> </form> </body> </html>
What Goes Into The Database When You Submit Via A Checkbox?
I have a simple form with a checkbox and I thought that when the box is checked and I submit to the MySQL database then the number 1 would appear in the database and if it wasn't checked then a 0 would appear. But whether it is checked or not, a 0 appears. How do I make it so that a 1 appears if the box is checked?
How To Check A Checkbox Based On Database Value
I have saved a "Y" or "N" in the database field, based on a Checkbox setting in the "Add Contact" screen. Now, in the Edit screen, I want to show the same checkbox, but it should be checked or unchecked, based on the value from the database. How do I check the checkbox based on the edit screen, based on the database value, in PHP?
Inserting Checkbox Data Into A Database
Typically, checkbox inputs have a name value of an array (something like <input name="options[]" type="checkbox" />). Is there an easy way for me to extract the values of such an array and insert them into the right database column? Or should I just bite the bullet and give each checkbox input a unique name so I save myself some confusion/readability?
Parsing Multiple Checkbox Variables Into A Database
I'm creating a page that includes check boxes that are pulled from a MySQL database. the user should then select which boxes they want, and then the values should be wrote back to the DB. however when the check boxes are returned they are all returned as the same value name, choice =1&22&choice=3%22 and so on. how can I parse this so that I can store the choices in the DB?
Pesky Checkbox Arrays And A MySQL Song Database
I'm not one who likes to ask for help, so for the last three days my brain has been turning to mush while I try to create a DJ Request Song Wish List. Anyone who can help me out will be saving me from severe insanity. :) My goal is to: 1. Display search results for song title, artist and genre. (accomplished) 2. Allow the user to add songs to their Wish List. This is done by displaying checkboxes with the corresponding value equal to the songID. (working on it) 3. Allow the user to update their wishlist by adding/deleting songs. So far I have a form that retrieves the song info from a database in a repeating region. In Dreamweaver: <input name="songID[]" type="checkbox" id="songID[]" value="<b><?php echo $row_RecordsetSearchResults['Title'];?></b> by <?php echo $row_RecordsetSearchResults['Artist'];?>"> This puts the corresponding songID number into a checkbox value, which in turn is submitted by form POST action to the following page as an array. To process this array I have: if(isset($_POST['songID'])) { $songID = $_POST['songID']; print '<p>Song IDs:</p>' // process items $n = count($songID); for($i = 0; $i <= $n; $i++) { //See if the values are being passed from POST echo $songID[$i]; echo '<br>' } $songsInsert = '*'.implode('*',$_POST['songID']).'<br>' $insertSQL = sprintf("INSERT INTO wishlist (Username, Title) VALUES (%s, %s)", GetSQLValueString($MM_Username, "text"), GetSQLValueString($songsInsert, "text")); mysql_select_db($database_ToneDeaf, $ToneDeaf); $Result1 = mysql_query($insertSQL, $ToneDeaf) or die(mysql_error()); } The problem is, I'm using implode. It does store the songs, but only as one long block of text. So if the user picks "New York by Frank Sinatra" and "Hot In Here by Nelly" it is stored as "*New York by Frank Sinatra*Hot In Here by Nelly*" Obviously this gives me no options to make this actually readable, let alone allow the user to remove one of those songs from their list (both would be have to be removed.) Also, referencing only the songID number as stored in the music database doesn't seem a good option, since the song database will be changing frequently and song data may be overwritten. Not sure if there's a viable workaround there. Originally I wanted to store Title, Artist, Genre under seperate columns so I could link them to something like "See more songs from this Artist." However the more I read about arrays and multidimensional arrays, I realize I'm not ready to go there yet. (I just started learning PHP two weeks ago.)
Session Registering
Im using session in my form, there are 6 pages to the form, It all works fine, until You work your way back through the form, to ammend the filled in details. e.g - If I go to page 1, and fill out my name, and post to the next page, heres the code Im using: PHP Code:
Sessions Not Registering?
I've already performed a search on all of the problems that people have come across while working with sessions and none of them have really helped me with the problem I'm currently having. PHP Code:
Secure Registering...
I am developing a PHP project, where users must register and get entered into a database - this is nothing new. It must be provided that a malicious script cannot fill the database with garbage entries. I have seen on some advanced pages how after sending register data a user gets presented with a picture containing some text or number that cannot be recognized by machine while easily by human. The user must enter that number and send it back; only then gets he entered in the DB. This method seems to be rather secure, and I would like implement it in my project. Here is my question : Where do these pictures come from? Are there any PHP-functions that allow to generate them programmatically? Or any other way?
Am I Just Registering Globals Here?
I have a bunch of old sites I need to change to account for the new default value register_globals=Off The quickest way was to put this in my header file: foreach ($HTTP_POST_VARS as $header=> $value ){ $$header = $value; } Did I just negate the value of the new default value? I'm trying to strike a balance so that I don't have to go through dozens of pages, finding all the unitialized variables, and still obtain some of the added security.
Connecting / Registering
i try to register a new account to my game it says "cannot register user". ive searched for this in my php files but cannot find it. also, when i try to log in to my game, it works and displays the new page. but the moment i refresh it says i am not logged in again. is this a problem with my cookies? does anyone have any ideas?
Registering Session Variables
Is there a way to register all of the form variables submitted on my page other than doing session_register('var1', 'var2', ....); or using the $HTTP_POST_VARS or $HTTP_GET_VARS arrays. I'm trying to let the variables keep the same name, since most of the script is already written, and changing all of them into array form would be quite a hindrance.
Registering An 'id' As Part Of A Session
This is my situation: im using sessions to registrate separately each user logs into my system. I register each user´s name and password in $_SESSION['username'] and $_SESSION['password'] respectively. In my database i have a table called "User" with these fields: userid username password role I ran into a problem in where i needed to insert in another table a new row with the value of the id of the user that is logged in to the system in that time. So i came up with this idea: session_register('username'); session_register('password'); session_register('userid'); $_SESSION['username']= $_POST['user']; $_SESSION['password'] = $_POST['pass']; $sql = "SELECT userid FROM User WHERE (username = '$_SESSION[username]' AND password = '$_SESSION[password]')"; $result=mysql_query($sql); $_SESSION['id'] = '$result' I thought it was fairly easy, but it didn´t work in first attempt. I "manually debugged" the code adding some echo "$result" but it throws me something like "resourse id #7", and i don´t know what is this.
Registering Session Trouble?
Is anything wrong with the code below. I was pretty sure that this was working earlier today and just wanted to make sure that the code below is registering a session to those who don't have one before i sift through the other 500 lines of code. session_start(); if(session_is_registered("user_logged_in")){ } else { session_register(user_logged_in); $_SESSION['user_id'] = $row['user_id']; $_SESSION['profile'] = "Bigs"; $_SESSION['acc_lvl'] = "-1"; $_SESSION['login'] = FALSE; $_SESSION['user'] = "Guest"; }
Registering A Session In Dynamic Website
I have a php website it's just a small one, for marketing purposes, similar to a survey, that data captures, then goes into a few pages of questions. And all the data is then slammed into a mysql database However I need to intorduce some sort of security to the site as I don't want people to just into the site mid way. The website is done using the "index.php?page=question1" method, where index.php is just a template and question1 is actually question1.htm, and included into index.php. I'm finding it really difficult to include seesions because I can't put it into index.php because the whole site uses that page and putting it in to teh header of question1.htm causes problems and I keep on getting headers already sent errors.
Registering Sessions Inside Of Functions
I am making a login script for my site and am having a buttload of trouble with trying to register a session inside of a function. I am new to working with functions. When the user logs in, the script goes to a function which loads the u/n and p/w into a session. PHP Code:
Registering Mysql Variables As Sessions
I'm having problems registering mysql values as sessions. I'm working on an authorization script and everything is authorizing and redirecting correctly, but I can't create a MySQL value session correctly. I'm looking to grab the 'id' out of matching authorized user, and obviously I need to take this id and pass it as a session. PHP Code:
Session Variable Not Registering The First Time I Log In
I'm making a pretty simple php login area, and I have tried to use session variables so I can access certain details about the current user logged in. When the user attempts to log in, the script verifies the username and password before any attempt is made to register session variables. Once the user is logged in properly, he is forwarded to the main page where a message is displayed saying Hello [Username], etc etc. The problem arises the first time I log into the system. The variables don't seem to register. I get a line at the top saying [Undefined index: user_id]. The line of code where the error arises is a simple SELECT * FROM table WHERE id=user_id. If I hit back and try to log in again, it works fine. If I hit the logout button and try to login, again, it works fine. If I close my browser and try again, the error appears again. The snippet of code where I register variables is here: PHP Code:
Registering A Session Variable Inside A Link
how do i register a session variable inside a link to pass to another page. I basically want the $id to pass as a session variable. any ideas? here's the code for the first page: <?php echo" <TD><a href='bymaster.php?id={$row[id]}'>".stripslashes($row[master_name])."[/url]</TD> "; echo "</TR> "; ?>
Checkbox
I am trying to make a form with 16 different checkboxes that pass on to an email. Someone got me started with the form but I'm not sure how to incorporate it into my php file. <INPUT name=other_needs[] type=checkbox id="other_needs[]" value=reception>Reception<TD> <TD><INPUT name=other_needs[] type=checkbox id="other_needs[]" value=Lunch>Lunch</TD> How do I refer to the checkboxes in my php file to include the results in the email the script sends?
Checkbox And SQL
What im stuck with at the moment is how to update the SQL database with the new information acquired from a set of check boxes. What i´ve done so far is to create the checkboxes and got the information from a table which checkboxes is needed and pre check it if it is already enabled. i have two rows in the database 1. Module_Name (name of a module) 2. is_enabled (is the module enabled 1 or 0). Code:
Checkbox Value
if i have 10 checkbox for customer interest.. how do i save that to database?? need to create 10 fields in the database?? after save.. how to display back when customer view his data.. if i choose swimming.. next time when i view back.. how to show swimming in the checkbox being checked
Checkbox
I have a database column which either holds the value 1 or 0. Now if there is a 1 in this column I want to produce a checkbox button that is ticked, and if a 0 then nothing ticked. So I thought it would work like this: <input name="dayTwo[]" type="text" id="dayTwo" value="<?php echo $databaseArray['d2']?>" size="6" /> However, it does not seem to work?
Checkbox
I am creating an email form with checkbox included. And I need the checkbox to be ticket when I enter the form though links. IE List of checkbox's checkbox 1 checkbox 2 checkbox 3 checkbox 4 say I was another page and I click on a link (call the link checkbox 1) I would like the checkbox to be ticked automatically. I know this makes no sense but I hope you get the idea.
Checkbox
i have a checkbox array of some unknown size.its a dynamic array created. i want to know out of all checkboxes how many r selected and which are they? and then insert the data in the table based on that. i hav written the code as follows:- <? $no=0; $friendname= $_POST['friendname']; $storecount=$_POST['storeid']; while($no<$storecount) { if($friendname[$no]) { $sql = "INSERT INTO groupfriends (groupid, username) VALUES ('$stid[$no]', '$friendname[$no]')"; $result = mysql_query($sql) or die('Query failed. ' . mysql_error()); } $no=$no+1; } ?> i dont think this will work.it will add all the checkoxes data to the table. i want to insert only of those which r selected.
Checkbox Values
Basically, I have 2 checkbox's which are printed out for each record within my table. On the next form, each checkbox is tested for being "checked" and the database is updated accordingly. This is fine. My problem is that I dont want users to be able to select both check-box's at the same time. After talking to "andnaess" on an earlier post and doing some reading, I decided upon using some javascript to do what i wanted. I have found a script which does exactly what i want, and i am now incorporating it into my original php script. I am having problems assigning a name and value variable with an array to my checkbox's. Is this possible, or have i got the wrong idea?
Checkbox Confusion!!!!
I have page1.php that displays some articles from a database by the condition 'on' What I want to do is have checkboxes so that the articles you check won't be displayed on the web page the next time it's brought up. Essentially turn the articles checked to the 'off' condition and leave the articles that are not checked to the 'on' condition. When you hit the submit button I want it to go to a page2.php to run an update query to change the 'on' condition to the 'off' condition for the specific articles that were previously checked. (My Primary Key in the database is Article_Number) I think i have page1.php correct (don't quote me on this!) <input type='checkbox' name='Display_Article' value='off'>"; But I'm completely lost on what to do for the page2.php if($submit) { for ($i=0; $i<count($Display_Article); $i++) { //echo "<li>".$Display_Article[$i]."</li>"; $sql="Update articles set Display_Article='$Display_Article[$i]' where Article_Number='$Article_Number'"; $result=mysql_query($sql) or die ("Update Query Failed"); }
Checkbox Problem?
I am having trouble with checkboxes. How do you have a checkbox that it it is not checked it will still allow the form to be submitted. I am using checkboxes now, and if all the checkboxes are not checked, then it says that each of the ones that aren't checked are undefined variables why?
Problem With Checkbox
When i click on submit then the table wont be updated. I wanted to try to update the colom aw with the desired awardsid but i also wonder what happens if i have selected 2 or more checkboxes and whats entered then in the table aw, 1 & 2 or ? PHP Code:
Retain Checkbox Value
Just a quick question regarding the way to do something rather than the actual code :- I have a page which has some links that go through to a HTML form and each link will check a certain checkbox. I want the form to retain the checked status of any checkboxes that are set to checked when the user goes back to the previous page. Would this be best done using sessions or is there another way I could use? I don't mind using sessions as I have used them before. I would like to avoid using cookies but I don't really have any strong objections to using them, it's just that they're not 100% reliable (but then, what is?).
CheckBox Question
i started a php site in dreamweaver and i try fill data into MySql database. i set up a page with a form and i can fill in all the fields. just for one field, i like to have several checkboxes. every checkbox has a value, and they should fill the same field with their vale when checked. i also want to keep my text box, so i can write additional information. at the moment, when i click more than one checkbox, only the value of the first checkbox appears in the database. also, if there is already some data in this cell, it delete previous data, but i would like to keep it. preferably it should just add to information allready in the database.
Disable Checkbox
I have a checkbox that I set by php code to be either "checked" or "". I want to disable the ability of the user to check or uncheck it. I tried "readonly", but that didn't work.
Checkbox Problem !
I try to display the multiple checkbox in my form and the quantity of this are depends on how many records in my database (usually the record is more than 500). So how big space it takes to display. And to solve the spaces problem, i thing i better display with horizontal scrollbar to save the space. But i don't know to do it.
Checking A Checkbox
Is it possible to preset the values of form elements with php - so that when the client gets the page certain boxes are checked or completed - on the fly - based on their HTML id. Javascript has a way of doing this - but i need the functionality of PHP too - so if i can move the whole thing over to php it owuld be better . javascript example - document.forms['form1'].elements['radiobuttonno'].checked = true;
Checkbox Array
checkbox arrays do not hold their respective positions as do other field arrays that are established to store the contents of selected records. The problem is that when you "uncheck" one of the elements and then repost, that array element disappears and the whole array collapses and renumbers itself with only the remaining "checked" ones -- simply useless when dealing with records in a table where all the field array elements should be in sync. I consider it a bug -- why does the array have to collapse? Why can't it just hold a null value and keep its position? The only fix is to never hold checkbox values in an array. Store them in individual variables numbered like an array, then do an "eval" to retrieve the contents. Here's the whole thing in action: Code:
Checkbox Not Between Date
I get a database for « News » on Internet. Side Admin, I would like a form to know witch "News" are Online or not. In my database mysql I get : Date_start and Date_end Outside this date, the « News » are unvisible. In my form I put a checkbox « Off_line » If it's check, all the news outside Date_start And Date_end must be visible. I tryed like this In Head : <?php if (isset($HTTP_GET_VARS["date_off"])) { $ date_off =$HTTP_GET_VARS["date_off"]; } else { $ date_off =0; } ?> In my form for checkbox : <input <?php if ("CURRENT_DATE NOT BETWEEN $row_R_news['date_start'] AND $row_R_news['date_end'] ",1) {echo "checked="checked"";} ?> name=" date_off " type="checkbox" id=" date_off " value="1"> For my request sql : SELECT t_news.* FROM t_news WHERE $date_off
Checkbox Array
I have a list of checkboxes. The name for each is being pulled up from a database. Each (minus irrelevent or implicit code) looks like this ... <input type=checkbox name=assnid$assnarray[assnid] value=1> or...peaking at the HTML, the list looks like this: <input type=checkbox name=assnid1 value=1> <input type=checkbox name=assnid2 value=1> <input type=checkbox name=assnid3 value=1> and so on... Anybody know how to post the selected checkboxes into $assnidarray? For example, assuming all are chosen, $assnidarray would be (1,2,3,...).
Checkbox Array
I have a checkbox array containing the id of a record in a MySQL database. The checkboxes are created dynamically depending on what is stored in the database. I want to send the checkbox array to my stop_subscriptions.php file, running the code on all checked boxes, however I dont seem to be able to actually send the array, I was hoping that someone could steer me in the right direction. <?php $sql = "SELECT i.type, i.title , s.inj_id FROM inj_subscription s, injustices i WHERE s.member_id = '$user' AND i.inj_id = s.inj_id AND s.inj_id IS NOT null" ; $result = mysql_query($sql); $row = mysql_fetch_assoc($result) ; if ($row) { echo "<div><span>Specific Subsriptions:</span><br/>" ; $table_start ='<table width="90%" table name="table2" align="center" cellspacing="0" border="0"> <tr> <form method="post" action="stop_subscription.php"> <th width="20%">Type</th> <th width="70%">Title</th> <th width="10%"></th> <input type="submit" name="Submit" value="Submit" style="font-size:10px"/><p> <input type="hidden" name="stop_subscription" value="1"/> </form> </tr>' echo $table_start; $rownum = 0; while($row) { $rownum++; $style = rowcolor($rownum); $table_rows .= '<td id="td" align="center" style="'.$style.'padding:5px;" >'." ".'<form><input type="checkbox" name="deletethis[]" value="'.$row['inj_id'] . '"></form></td>'." "; echo "<tr>" . $table_rows . "</tr>"; $row = mysql_fetch_assoc($result) ; } echo '</table><Br/></div><br/>' } ?>
Checkbox Without Array
I have a question regarding implementing a checkbox that DOESN'T use arrays -- everything i find when i google has arrays in it! So, I'm hoping someone here can help me come up with a solution to my problem. I have a checkbox that a user can check (default will be to have it NOT checked) - and once it's checked, to keep it checked until the user unselects it again. Here's my checkbox code: <input type ="submit" name="cv_permission" type="checkbox"> What do I have to do to keep it turned 'ON' once it's checked?
Checkbox FormMailer
Ive got this problem and i have no idea how to fix it. Ive been trying to do it in PERL, but thats not my strong point, and i know a lot more PHP than perl. But still dont know enough to try and achive what i want to do. Basically i am trying to have a web form in which the company fills out the form and can select which people to send the form to. Code:
$_POST Checkbox
I'm trying to create a validate members page that lists all the unvalidated members and beside it is a checkbox with the name attribute being the member's name. Is there a way to create a foreach loop to check all the $_POST and check if it's empty, and if not, do something?
For Each None Checked Checkbox
I need help with foreach none checked checkbox as value, can you even do that. I tryed the !isset(); function but i'm not sure it would work because the none checked box would not of run with the $_POST ( i think ) this is an example table of what i'm looking for help with: ({num}) = the value [] = the checkbox. (1)(2)(3)(4) [] [] [] [] the person checks the one(s) they wish to keep and the none checked ones get swaped for diffrant values. I'm not quite sure if it is possible, but i will ask anyway to see if anyone as a solution.
Checkbox Blues
I have the following checkboxes where I am using an array called check[] ... <input name = "check[]" type = "checkbox" value = 'somevalue1' /> <input name = "check[]" type = "checkbox" value = 'somevalue2' /> <input name = "check[]" type = "checkbox" value = 'somevalue3' /> When selected by the user, I wish to delete the selected records using this code ... // capture checkbox data $data = $_POST['check']; // start delete loop foreach ($data as $key => $value ) { // create SQL string $SQL = 'DELETE FROM ' . $table . ' WHERE name = "' . $value .'"'; // run SQL query code goes here } This code works fine ! BUt the javascipt functionality that references it does not work ! What I would like to know is how I can do the same thing but AVOID using the check[] array, by using checkboxes like this ... <input name = "check" type = "checkbox" value = 'somevalue1' /> <input name = "check" type = "checkbox" value = 'somevalue2' /> <input name = "check" type = "checkbox" value = 'somevalue3' /> Has anyone got any good references for dealing with checkboxes in php ?
Checking For Checkbox Array
I'm working on a page for an e-commerce site that has a form than lists items in an order placed by a customer. The form serves two purposes: to edit and save the details of the items (i.e. number of items, price, etc.) and to split the order (i.e. select certain items to remove from the order and use to create a new separate order). Each item has a checkbox next to it, and the name for the checkbox is "name[]" so an array of the checked items is created and passed to the processing script. The logic I want to use to determine if the items are being saved or being split out is by looking at the $name array. However, if I try something like "if ($_POST['name'])" and none of the checkboxes are checked, I get an Undefined Index error (it works fine if there are items checked). What is a valid way to check to see if the $name array exists so I know which action to take?
Smarty: Checkbox Validation
I have smth. like this: file.php: <?php SmartyValidate::connect($smarty); //SmartyValidate::register_form('register'); $smarty->assign('nl_id',0); $smarty->assign('nl_sel',$Fnewsletter); $smarty->assign('nl_name','Fnewsletter'); $smarty->assign('pp_id',0); $smarty->assign('pp_sel',$pp); $smarty->assign('pp_name','Fnewsletter'); if(SmartyValidate::is_valid($_POST) == true) { // Register } else { // Form displayed with hints ex. "You forget e-mail" $smarty->assign($_POST); $smarty->display("register_form.tpl"); } ?> Theme.tpl {$duplikacja_usera} <p>{validate field="Flogin" criteria="notEmpty" message=" Podaj login "}</p> <p>{validate field="Fhaslo" criteria="notEmpty" message=" Podaj hasL,o "}</p> <p>{validate field="Fhaslo" criteria="isEqual" field2="Fhaslorepeat" message=" HasL,o nie zgadza siÄ™ z powyLLszym "}</p> <p>{validate field="Fimie" criteria="notEmpty" message=" Podaj imie "}</p> <p>{validate field="Fnazwisko" criteria="notEmpty" message=" Podaj nazwisko "}</p> <p>{validate field="Fmail" criteria="isEmail" message=" Podaj poprawny e-mail "}</p> <p>{validate field="Fulica" criteria="notEmpty" message=" Podaj ulice "}</p> <p>{validate field="Fnumer" criteria="notEmpty" message="Podaj numer domu "} </p> <p>{validate field="Fkod" criteria="notEmpty" message=" Podaj kod pocztowy "}</p> <p>{validate field="Fmiasto" criteria="notEmpty" message=" Podaj miasto "}</p> <BR> <form name="register" onsubmit="return check(this)" action="index.php/mode/register" method="POST"> <input type="hidden" name="akcja" value="rejestruj"> <input type="text" name="Flogin" value="{$Flogin}" maxlength="20" class="login_in" style="width:150px"></div> <input type="password" name="Fhaslo" maxlength="20" class="" class="login_in" style="width:150px"></div> <input type="password" name="Fhaslorepeat" maxlength="20" class="" class="login_in" style="width:150px"> <input type="text" name="Fimie" value="{$Fimie}" maxlength="20" class="login_in" style="width:150px"> <input type="text" name="Fnazwisko" value="{$Fnazwisko}" maxlength="100" class="login_in" style="width:150px"> {validate field="Fnazwisko" criteria="notEmpty" message=" Podaj nazwisko "}</div> {html_checkboxes name="Fnewsletter" values=$nl_id selected=$nl_sel}..........
Checkbox In Mysql Fields
PHP selects and shows a list of records. Next to each record is a check box. If user checks the box the record(s) is selected and appended to another 2nd DB....when the user finally presses a button Basically I hope you get my drift, pretty normal but powerful stuff... Are there any tutorials or snips on how I'd do this?
How To Give A Value To Non Selected Checkbox
I would like to get a value for a non selected checkbox in a form. Imagine my form contains : <input type='checkbox' name='t[0]' value=Ƈ'> <input type='checkbox' name='t[1]' value=Ƈ'> When I analyse $t, if first checkbox is not selected and second is, I have : $t[0] has no value. $t[1] equals 1 and count($t) equals 1 I would like to find a way to get : $t[0] equals 0. $t[1] equals 1 and count($t) equals 2
|