Jump to content

Nandini

Members
  • Posts

    160
  • Joined

  • Last visited

    Never

Everything posted by Nandini

  1. Thanq my dear friend. Its working fine now. Now onwards i will post the topics related to particular categories. Thanq thanq very much.
  2. Hi Sorry for the disturbance. i have two select box named as call-monitor and call-barge. Both select box contain options as Enable and Disable. Below i have one text field. If user select both select box as Disable then only the text field should be disable with out pagerefresh. how can i do this. please help me, this is urgent.
  3. Thanq ranjuvs your code was working fine. i have also got some code. Seet this. <script type="text/javascript"> function dis() { switch(document.getElementById('enadis').value) { case "enable": document.getElementById("mySelect").disabled=false; break; case "disable": document.getElementById("mySelect").disabled=true; break; } } </script> <form> <select id="enadis" onchange="dis();" name="s"> <option value="enable">Enable</option> <option value="disable">Disable</option> </select> <br /><br /> <input type="text" id="mySelect" name="mySelect"> </form> Anyhow your code was workin fine. Thanq very much
  4. Hi I want to disable html text field by selecting on select box. i have a select box with two options as Enable and Disable. If i select Disable the text field should be disable. if i select enable the text field should be enable. These operations should be done without page refresh by using javascript. I have implemented some code. But its not working in I.E. But in other browsers its working fine. Please check my code and let me know mistakes. here is my script. <html> <head> <script type="text/javascript"> function disable() { document.getElementById("mySelect").disabled=true; } function enable() { document.getElementById("mySelect").disabled=false; } </script> </head> <body> <form> <select name="s"> <option onclick="enable()" value="Enable">Enable</option> <option onclick="disable()" value="Disable">Disable</option> </select> <br /><br /> <input type="text" id="mySelect" name="t"> </form> </body> </html>
  5. I think this is for system ip. I am asking about Global ip. See http://www.myglobalip.com. I want to display like this
  6. Hi friends. How can i get user's Public Ip address by using php Can any one send me scripts or links. Thanq
  7. Hi friends I don't know this is the correct place to post this type of question. But i have strong feeling as this phpfreaks is the best place to get solution for any problem. Okay, my question is i am working on a small company. i am getting salary 4500/- per month. i did two websites by using php and mysql. As all of know my salary was not sufficeint for me. So i want to earn something money with using of my php or any online earnings etc. Can u please guide me. Thanq
  8. Hi all I did M.C.A . Now i am on job searching. i want to earn money by doing online home made jobs for free. Can any one tell me how can i do that. Thanq
  9. Hi i am designing php aurthentication script. I want to validate username field while create useraccount. I want to validate username as same as gmail username. That means only letters (a-z), numbers (0-9), and periods (.) are allowed. and username cannot contain consecutive periods (.), like this. i have used the following line of code. But i did not get complete solution. eif(!eregi("^[a-z0-9.]{4,16}$",$_POST['username'])) { $errmsg='Only letters (a-z), numbers (0-9), and periods (.) are allowed for username.'; } Can anyone give me solution
  10. hi i have a form with in while loop. In that form i have a field like mailbox number. If user enter submit button with unique mail box number values , I want to display an error message as "Dont enter unique values for mail box number" here is my script <form method="post"> <? if(isset($_POST['submit'])) { $i=0; $row_size=count($_POST['secret']); while ($i < $row_size) { $check_mailbox=mysql_query("select * from astaccount where accountcode='".$_POST['mail_box'][$i]."'"); $mailbox_num=mysql_num_rows($check_mailbox); if(empty($_POST['secret'][$i])) { $errmsg="Enter secret value."; } if(!ctype_digit($_POST['secret'][$i])) { $errmsg="Enter numerical values for secret."; } if(strlen($_POST['secret'][$i])<4) { $errmsg="Minimum four digits for secret"; } if(strlen($_POST['secret'][$i])>6) { $errmsg="Maximum six digits for secret"; } if(empty($_POST['mail_box'][$i])) { $errmsg="Enter mailbox number"; } if(!ctype_digit($_POST['mail_box'][$i])) { $errmsg="Enter numerical values for mailbox number"; } if($mailbox_num==0) { $errmsg="<b>".$_POST['mail_box'][$i]."</b> is not an existing mailbox number"; } [b]i want to display error here when mailbox number filed contain unique value[/b] ++$i; } if($errmsg == '') { ///////update operation } } if(!isset($_POST['submit']) || $errmsg != '') { ?> <div align="center"><font color="red"><? echo $errmsg; ?></font></div><br> <table class="cptable" border="0" cellpadding="0" cellspacing="0" width="70%"> <tr height="25px" class="table_header"> <th><font color="white">Account</font></th> <th><font color="white">Secret</font></th> <th><font color="white">Notification Email</font></th> <th colspan="6"><font color="white">Mailbox Number</font></th></tr> <div id="content"> <?php $row_uid="22"; $sql1 = mysql_query("SELECT * FROM astaccount where uid ='".$row_uid."'"); $i=0; while ($res = mysql_fetch_array($sql1)) { ?> <tr bgcolor="#e9f0f9"> <td><input type="text" name="secret[<? echo $i; ?>]" value="<? echo $res['secret']; ?>"></td> <td><input type="text" name="mail_box[<? echo $i; ?>]" value="<? echo $res['mailbox']; ?>"></td> </tr> <input type="hidden" name="id[<? echo $i; ?>]" value="<? echo $res['uid']; ?>"> <input type="hidden" name="ac[<? echo $i; ?>]" value="<? echo $res['accountcode']; ?>"> <?php ++$i; } ?> <tr bgcolor="#e9f0f9"><td colspan="6" align="center"> <input type="submit" name="submit" value="submit"> </td></tr> </table> <? } ?> </form>
  11. hi I got a code at this site. http://www.theblog.ca/update-multiple-rows-mysql thanks for your co-peration
  12. Hi I have a database table named as 'astaccount'. In that i have 3 records with the id of 22. I want to display those records and change the values with only one submit button. Here is my script. Can any one tell me how can i do this. <form method="post" name="" action=""> <table class="cptable" border="0" cellpadding="0" cellspacing="0" width="70%"> <tr height="25px" class="table_header"> <th><font color="white">Account</font></th> <th><font color="white">Secret</font></th> <th><font color="white">Notification Email</font></th> <th colspan="6"><font color="white">Mailbox Number</font></th></tr> <?php $row_uid=22; $sql1 = mysql_query("SELECT * FROM astaccount where uid ='".$row_uid."'"); while ($res = mysql_fetch_array($sql1)) { $accountcode=$res['accountcode']; $secret=$res['secret']; $mailbox=$res['mailbox']; $mailbox_mail=$res['mailboxemail']; ?> <tr bgcolor="#e9f0f9"> <td><input type="text" name="account_code" value="<? echo $accountcode; ?>"></td> <td><input type="text" name="secret" value="<? echo $secret; ?>"></td> <td><input type="text" name="mail" value="<? echo $mailbox_mail; ?>" readonly></td> <td><input type="text" name="mail_box" value="<? echo $mailbox; ?>"></td> </tr> <input type="hidden" name="hid_id" value="<? echo $uid; ?>"> <?php } ?> <tr bgcolor="#e9f0f9"><td colspan="6" align="center"> <input type="submit" name="submit" value="submit"> </td></tr> </table> </form> this is the frontend coding. How can i change values with one submit button.
  13. Can any one tell me What is the difference between Application developement and web developement.? Send me example url's which are done by php
  14. Hi I want create XML file from mysql table. I have written some script to do that. By using that script xml file was displaying. But database values are not displaying. Here is my script. Can any one tell me where is wrong. <? $host="localhost"; $dbname="test"; $dbtable="white_list"; $dbuser="root"; $dbpass=""; header("content-type:text/xml"); function getXML($sql="Default Query") { $conn=mysql_connect($host,$dbuser,$dbpass); $db=mysql_select_db($dbname); $result = mysql_query($sql,$conn); $columns=""; echo "<records>"; while($row=mysql_fetch_assoc($result)) { $columns.="<record>"; foreach($row as $key => $value) { $columns.="<$key>$value</$key>"; } $columns.="</record>"; } echo $columns; echo "</records>"; } getXML("SELECT * FROM white_list"); ?>
  15. My problem was solved by using "stripslashes" function .
  16. Sorry i forgot to write submit button script. Here is my total script <? if($_POST) { if(!eregi("^[a-z0-9.]{4,16}$",$_POST['username'])) { $errmsg='Only letters (a-z), numbers (0-9) and periods (.) are allowed.'; } } ?> <form method="post" action=""> <? echo $errmsg; ?> <table border="0" width="100%" cellpadding="6" cellspacing="0"> <tr bgcolor="#e9f0f9"><td align="left">Username<font color="red">*</font></td> <td align="left"> <input type="text" name="username" value="<? echo $_POST['username']; ?>"> </td></tr> <tr><td colspan="2" align="center"> <input type="submit" name="submit" value="submit"> </td></tr> </table></form>
  17. Hi all I am so worrying about one problem. i want validate username field with php i want to allow only numbers, alphabets and periods(.) to username. If i give '\' to username and click submit button its giving error message like "Only letters (a-z), numbers (0-9), and periods (.) are allowed." till then fine. But After i got error message my username value containg double \ (\\) For example : First i give peter\ into username field. The error message has displayed as above. And username field shown as the value of peter\\. And i click submit again, error message has been displayed, username field shown as the value of peter\\\\. Can anyone help me out. Its urgent. Here is my script. <? if($_POST) { if(!eregi("^[a-z0-9.]{4,16}$",$_POST['username'])) { $errmsg='Only letters (a-z), numbers (0-9) and periods (.) are allowed.'; } } ?> <form method="post" action=""> <? echo $errmsg; ?> <table border="0" width="100%" cellpadding="6" cellspacing="0"> <tr bgcolor="#e9f0f9"><td align="left">Username<font color="red">*</font></td> <td align="left"> <input type="text" name="username" value="<? echo $_POST['username']; ?>"> </td></tr> </table></form> Can anyone help me
  18. topic solved by using insert command within foreach loop. thanx for everyone.
  19. Every row has the same id means those details are belongs to one user. So for every user can insert those values. So for every user that id incremented by 1. see this ---------------------------------------------------------------- id keyword data ---------------------------------------------------------------- 1 abc 123 1 qqqqqqq 938 1 eeeeeee 87373 2 abc (2nd user) 123 2 qqqqqqq(2nd user) 938 2 eeeeeee(2nd user) 87373 ----------------------------------------------------------- Hi shatner. Thanx for your help. how can i store these values as shown in the previous table
  20. hi all i am so worrying about php split. i have a textarea field with values as abc=123 qqqqqqq=938 eeeeeee=87373 etc I dont know how much lines of data user will be enter. I want to split that data by line wise and store those values into mysql table as follows. ---------------------------------------------------------------- id keyword data ---------------------------------------------------------------- 1 abc 123 1 qqqqqqq 938 1 eeeeeee 87373 ----------------------------------------------------------- number of lines are not constant. In this scenario number of lines are 3. in future it will be 4 or 7 or 10 etc. Can any one send me script Its urgent , pls
  21. Hi the problem was solved. I ts a permssions problem. First i have changed the permissions using 'chmod 0777 netzgate' on commandline. After that i have execute the script. Directory was created. Thanq very much for every help.
  22. root@nani:/usr/local/netzgate/var/lib# ls -lrt total 4 drwxr-xr-x 9 root ng-data 4096 2008-11-20 23:41 netzgate root@nani:/usr/local/netzgate/var/lib# These are the permissions
  23. Hi i am using ubuntu. I want to create directory named as 'directory' using php. i am using following script. But not able to create directory. Can any one help me about the problem. My script is as follows $thisdir="/usr/local/netzgate/var/lib/netzgate"; $req_dir=$thisdir."/directory"; chmod($req_dir, 0755); $dir=mkdir($req_dir); if(!$dir) { echo "Directory not created..."; } else { echo "Directory created "; } It is displaying always as 'Directory not created'. I dont know whats the problem.
  24. Hi i am doing a website using php and mysql i want to put a search field with Go button at the corner of the header. if user enter some thing in to that field, i want to display all the page results within the website. Can anyone tell me how can i do this. Or send me url's Thanq
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.