
sowna
Members-
Posts
31 -
Joined
-
Last visited
-
Days Won
1
Everything posted by sowna
-
Redirect to different url depending on values of 2 dropdowns
sowna replied to Kevin_Verhoeven's topic in Applications
Based on the dropdown values, you want to redirect users to different page, right? I consider you will button in the form. On clicking the button, call below function... function redirect() { if(document.getElementById('select_17').value == 'Ja' && document.getElementById('select_18').value == 'Ja') { window.location.replace = 'both parents url'; } else if(document.getElementById('select_17').value != 'Ja' && document.getElementById('select_18').value != 'Ja') { window.location.replace = 'both parents not coming url'; } else { window.location.replace = 'one parents coming url'; } }- 5 replies
-
- chronoforms
- redirect
-
(and 3 more)
Tagged with:
-
Thanks I forget to tell one thing, it not only contain email id also some name and numbers, Example: this is test for checking the tagging for @[email protected] and @[email protected] tested by @Siva kumar roll no @12345678 so the output should be array[0] = [email protected] array[1] = [email protected] array[2] = siva kumar array[3] = 12345678 And i want to split the same using javascript also...
-
Hi i am want to split the below string String: this is test for checking the tagging for @[email protected] and @[email protected] and the output should be, array[0] = [email protected] array[1] = [email protected]
-
check whether your query executed without error, replace the below code and check it.... $result = mysql_query($query1) or die(mysql_error());
-
Filling Text Box Based On Comboselected Value!
sowna replied to saravanataee's topic in PHP Coding Help
Just replace combo box with text field...and modify the code as per your requirement... -
As per your code, first point will work correctly if you have id and field column exists in the field table. Can you show me the fields in that table... For 2nd point, you can store values using comma separate ids, like, if you select two options whose ids will be 10 and 23 then in the database store 10,23. You can use implode() to convert array into comma separated string...
-
replace $photos as $photo in the loop, like this foreach ($photos as $photo){ echo $photo->caption; echo $photo->category(); echo "</br></br>"; }
-
Query Failed: Unknown Column 'tenantid' In 'where Clause'
sowna replied to sagisgirl's topic in PHP Coding Help
tenantID is empty here... check the tenantID variable... -
using session_destroy() will destroy entire session, better use like this if(isset($_SESSION['SESS_STATUS']) && $_SESSION['SESS_STATUS'] != '') { $status = $_SESSION['SESS_STATUS']; echo $status; $_SESSION['SESS_STATUS'] = ''; } Even i too have this issue and solved this issue like above...sometimes unset is not working on session...
-
Want To Load Mysql Table Data In Combo Box In Php
sowna replied to saravanataee's topic in PHP Coding Help
seems you missing semicolon in the first two lines, please find below code which i have modified little <?php $sql="select itemno,itemname from item"; $q=mysql_query($sql); echo "<select name=\"test\">"; echo "<option size =30 ></option>"; while($row = mysql_fetch_array($q)) { echo "<option value='".$row['itemno']."'>".$row['itemname']."</option>"; } echo "</select>"; ?> -
Filling Text Box Based On Comboselected Value!
sowna replied to saravanataee's topic in PHP Coding Help
You can use ajax for this....call ajax when first combo1 is selected and based on this value fill the second combo... Again call ajax for the second combo and fill the value in the textbox based on the name you selected in the combo box... You will get many sample by searching google (populating dropdown using php/mysql) or refer below url http://buffernow.com/demo/cascadedrpdwn/ -
I think combining * and aggregate function in select query together will not give right answer... You can use like this, to get sum of number5, $sql_select = "SELECT SUM(NUMBER5) from Data where userid='" . $param['userid'] . "' order by timestamp asc"; or if you want to find sum of all users, you can use like this... $sql_select = "SELECT userid, SUM(NUMBER5) from Data group by userid";
-
simply you can use like this, $result = mysql_query("SELECT meta_value FROM wp_usermeta WHERE user_id=1 and meta_key='rcp_status'"); $meta_value = mysql_result($result,0);
-
Thanks sen...i will try and see if i can get the report....
-
Yeah i understand but i am using Form tools open source to create forms and its fields and all fields comes in single table...i was thinking to get reports but no idea triggering so far thats why i posted here to get some idea... now i can't go with another table...will see to get the reports...thanks for your reply...
-
Hi i have table that shows users participating in activities, like below fields, activity1, activity2, activity3, activity4, activity5 and if user participating in any one activity then the value will be "Yes" else it will be "no". Now i need to find the no. of users participating in 0 activities (users not particpating any activties), 1 activities, 2 activities, etc... and also i need to get the number of users participating in each activities.
-
@joe92 - Actually i will get html content from mysql database and while showing it, i have to strip onclick,onmouseover... attributes... hope now you understand why i need this.
-
Hi could you tell me how to strip attributes onclick, onmouseover, onchange, etc... from all the html tags. I searched google and got below code but strips all the attributes in the html tags, function stripArgumentFromTags( $htmlString ) { $regEx = '/([^<]*<\s*[a-z](?:[0-9]|[a-z]{0,9}))(??:\s*[a-z\-]{2,14}\s*=\s*(?:"[^"]*"|\'[^\']*\'))*)(\s*\/?>[^<]*)/i'; // match any start tag $chunks = preg_split($regEx, $htmlString, -1, PREG_SPLIT_DELIM_CAPTURE); $chunkCount = count($chunks); $strippedString = ''; for ($n = 1; $n < $chunkCount; $n++) { $strippedString .= $chunks[$n]; } return $strippedString; } thanks for your help.
-
wow super josh...its really helpful to me...thanks for help....
-
try like this $sql = mysql_query("Update grocery_cart SET order_size='".$box_selection."', pp_check='".$agree."', payment='".$payment."' WHERE userid='".$user."'");
-
Thanks josh and ragax... its working fine.... could u please tel me how to fetch the entire '<a href="site/user/36" title="Vinodkumar">Vinodkumar 36</a>' in the loop?? i searched google but didn't found any function...
-
Sorry guys for late reply...had some network issue, i tried below code, i know this is very bad code which i wrote...this was working fine when i use anchor tag without title attribute...and i want to fetch uid in a simple way...that's why i asked help from you people... $strArray = explode('<a href=',$str); $finalArray = array(); if(count($strArray)>1){ $firstArray = array(); foreach($strArray as $key => $value){ if(strlen(trim($value))>0){ preg_match( "/user/", $value , $matches, PREG_OFFSET_CAPTURE); if(count($matches)>0){ $subpart = explode('">',$value); $firstArray[]=$subpart[0]; } } } if(count($firstArray)>0){ $firstArray = implode("/",$firstArray); $firstArray = explode("/",$firstArray); $finalArray = array(); foreach($firstArray as $key => $value){ if (is_numeric($value)) { $finalArray[]=$value; } } return ($finalArray); } }
-
Hi i have to fetch the userid from the anchor tag, for example, <a href="site/user/39" title="Vinodkumar">Vinodkumar</a> i want the fetch the "39" id from the above url. Please give me the expression....
-
I have a link with target='_blank'. when i click the link it will take me the new tab in FF and new window in IE. here the focus is given to the new window or tab. I want to keep the focus on the parent window itself when i click on the link. how to do this?