SUNIL16
Members-
Posts
59 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
SUNIL16's Achievements
Member (2/5)
0
Reputation
-
this is form <form action="foo.php" method="POST"> Name: <input type="text" name="username" /><br /> Email: <input type="text" name="email" /><br /> <input type="submit" name="submit" value="Submit me!" /> </form> in foo.php i am getting values of username and email in firefox but in ie6 i am not getting using $_POST['username'] or using $_REQUEST['username'];
-
Hi Friends, I have form in that i am sending some values using POST method. But i cant able to get values using $_POST['var'] or $_REQEUST['var'] Data is not coming in IE6, But it is coming in firefox and other browsers even in IE8. What may be problem? any settings i have to make for IE6. ? Any suggestions
-
how to get data between two same dates when datefield is DATETIME
SUNIL16 replied to SUNIL16's topic in MySQL Help
thank u sir, it solved my problem -
Hi friends How to get data between two same dates my query is working for timestamp 00:00:00 below is my query SELECT ACTIVITY_TYPE,,date_format(ACTIVITY_DATE,'%Y/%m/%d') as logdate FROM activity_log WHERE ACTIVITY_DATE BETWEEN STR_TO_DATE('10/12/2010','%d/%m/%Y') and STR_TO_DATE('10/12/2010,'%d/%m/%Y') values in table type date a 10/12/2010 11:39:43 b 10/12/2010 13:39:43 c 10/12/2010 14:39:43 my above query will work and returns these 3 rows wen data is like this a 10/12/2010 00:00:00 b 10/12/2010 00:00:00 c 10/12/2010 00:00:00 but when time is there how to fetch data any ideas thanks sunil
-
How can i get month value in a date format month/year
SUNIL16 replied to SUNIL16's topic in PHP Coding Help
How to do same in Mysql? -
How can i get month value in a date format month/year
SUNIL16 replied to SUNIL16's topic in PHP Coding Help
Thanks AbraCadaver, Let me know other type of getting values, Let me learn more. -
Hi friends, How can i get month in numeric and year in date format mar/2008 date format. I need to store month value in one variable and year in other. for above $a=3, $b=2008 like this.
-
Creating array in loop and getting result problem
SUNIL16 replied to SUNIL16's topic in PHP Coding Help
Hi kenrbnsn, They are coming from database. for($i = 0; $i<$num ; $i++) { $arr.$i = array('$result[type]'=>'$result[values]'); this will be 'a'=>'1' } -
Creating array in loop and getting result problem
SUNIL16 replied to SUNIL16's topic in PHP Coding Help
Please any one having any logic -
Hi friends, below is my code $arr1 = array('a'=>'1'); $arr2 = array('a'=>'0.5'); $arr3 = array('b'=>'1'); $arr4 = array('a'=>'1.5'); $arr5 = array('c'=>'1'); $arr6 = array('b'=>'1'); $arr7 = array('c'=>'1.5'); $arr8 = array('a'=>'1'); $all_array = array_merge_recursive($arr1, $arr2, $arr3, $arr4, $arr5, $arr6, $arr7, $arr8); echo "<pre>"; print_r($all_array); echo "</pre>"; foreach($all_array as $all_array_key => $all_array_value) { $all_count = 0; foreach($all_array_value as $all_array_value_key => $all_array_value_value) { $all_count += $all_array_value_value; } echo $all_array_key." = ".$all_count."<br>"; } now result i am getting a = 4 b = 2 c = 2.5 but my condition is not this i will be creating multiple array using loop, then how can use array_merge_recursive? I want for this above result for($i = 0; $i<$num ; $i++) { $arr.$i = array('a'=>'1');//like this i will be sending value dynamically //(say second will be array('b'=>'1.5') 3rd array('c'=>'1'), 4th array('a'=>'1.5') like that } then it will create arrays untill that $num value reaches, now how can i get the result in the same way as above. Please let me know any logic or code. how to do this.
-
Its working in IE wen made XMLHttpRequestObject = new ActiveXObject("Microsoft", "XMLHTTP"); to XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP"); Its not working in Morzilla, chrome y?
-
Hi Friends, why i am not able fetch message in data.txt file <html> <head><title>Ajax Demo</title> <script language="javascript"> var XMLHttpRequestObject = false; if(window.XMLHttpRequest) { XMLHttpRequestObject = new XMLHttpRequest(); } else if(window.ActiveXObject) { XMLHttpRequestObject = new ActiveXObject("Microsoft", "XMLHTTP"); } function get_data(sourcedata, DivId) { if(XMLHttpRequestObject) { var obj=document.getElementById(DivId); XMLHttpRequestObject.open("GET", sourcedata); XMLHttpRequestObject.OnreadyStateChange=function() { if(XMLHttpRequestObject.readystate == 4 && XMLHttpRequestObject.status ==200) { obj.innerHTML=XMLHttpRequestObject.ResponseText; } } XMLHttpRequestObject.Send(null); } } </script> </head><body> <h1> Ajax demo</h1> <form> <input type="button" value="fetch message" OnClick="get_data('data.txt','targetdiv')"> </form> <div id="targetdiv"> <p>fetched message will apear here</p> </div> </body></html> Where i went wrong?
-
What is this error? Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\jaga\login.php:9) in C:\xampp\htdocs\jaga\login.php on line 12 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\jaga\login.php:9) in C:\xampp\htdocs\jaga\login.php on line 12 Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\jaga\login.php:9) in C:\xampp\htdocs\jaga\login.php on line 37 Why it is showing? below is my code <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Login Page</title> <?php require("config.php"); session_start(); if ($_POST['submit']=='login') { $username="$_POST[username]"; $password="$_POST[password]"; $sql="SELECT username FROM users where username='$username' AND password='$password'"; $result = mysql_query($sql) or die (mysql_error()); $num = mysql_num_rows($result); if ( $num != 0 ) { // A matching row was found - the user is authenticated. list($username) = mysql_fetch_row($result); // this sets variables in the session $_SESSION['user']= $username; header("Location: Content.html"); //echo "Logged in..."; exit(); } header("Location: login.php?msg=Invalid Login"); } ?> </head> <body> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="325"> <tr> <td width="100%" height="114"><font size="7">Login Page</font></td> </tr> <tr> <td width="100%" height="178">Login:<div align="center"> <center> <p><?php if(isset($_GET[msg])) { echo $_GET[msg]; }?> </p> <form name="form1" method="post" action=""> <table border="1" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="51%"> <tr> <td width="36%" align="center">Username:</td> <td width="64%" align="center"><input type="text" name="username" size="28"></td> </tr> <tr> <td width="36%" align="center">Password:</td> <td width="64%" align="center"><input type="password" name="password" size="28"></td> </tr> <tr> <td width="100%" align="center" colspan="2"> <input type="submit" name="submit" value="login"> </td> </tr> </table> </form> </center> </div> </td> </tr> <tr> <td width="100%" height="31"> </td> </tr> </table> </body> </html>
-
Ya thanks i agree i was wrong. i send query two times.
-
Is my sql syntax wrong! It worked for me in live server? Suggestions...