Jump to content

manmadareddy

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by manmadareddy

  1. yoy can store an array in a session variable $_SESSION['arr']=array("12","13","14");
  2. Hi Its simple you have placed the <body> tag inplace of <body bgcolor="#0066cc">.
  3. It won't workout for local machines. If we want to connect to a remote database you must need to access that database from a static IP. That is your public IP. You just need to give your IP address at the remote db access panel.
  4. Yeah! you are right..I am very sorry for my bad suggestion. You have given good suggestions for me. I am very much thankful to you.
  5. Hi after seeing that i came to know that i am unable to do that . I am very sorry for that.
  6. try this <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <SCRIPT LANGUAGE="JavaScript"> <!-- function checksub(obj) { if(obj.checked==true) { document.frmtest.txt_once.disabled=true; } else { document.frmtest.txt_once.disabled=false; } } //--> </SCRIPT> </HEAD> <BODY> <FORM name='frmtest' METHOD=POST ACTION="" > <INPUT TYPE="checkbox" NAME="chk_once" onclick="return checksub(this);">checkbox <INPUT TYPE="text" NAME="txt_once"> </FORM> </BODY> </HTML>
  7. $sql="select distinct(Item),count(Item) as cnt,itemcode from products group by Item"; By using the above query u will get the counts of each item with itemcode. u can do sort on the result set and get the max one.
  8. I hope u need only some fields which are not replicated I mean unique like email. first identify those fields and just write a select query . $sql="select count(*) as cnt from tablename where email!='".$_REQUEST['email']."'"; //you can add if you need to check another fields too like $sql." and fname!='".$_REQUEST['fname']."'"; $res=mysql_query($sql); $result=mysql_fetch_assoc($res); if(!$result['cnt']) {   //here insert statement }else {   //email already exists error message //same form with $_REQUEST fields filled }
  9. <INPUT TYPE="button" onclick="this.disabled=true;functiontosubmitform();"> I hope this will be helpful
  10. preg_replace("/rn/", "\n", "words... words and words.."); try this
  11. just use imagefactory functions from phpclasses.org I hope that will solve ur problem.
  12. I hope your facing problem with newline characters. You just need to replace that character with new line character while displaying.
  13. Just small suggestion, I hope you don't need to do any coding changes for this. Just need to have the permissions for your IP at Geocities. To know this just open the cpanel of geocities in the main page click the mysql databse and in that page you will find the list of IPs which are having permissions to access that database.Just you need to put one entry of  your IP there. I am sure this will solve your problem.
  14. I hope this kind of resize will loose the quality It is better to use ImageMagick for resizing the images. Its very easy process, Just we need to execute commands through our php code.
  15. You can just replace that character with your customize character using string functions. But while retrieving for disaply you must again need to replace you character with new line character.
  16. you can do this using curl functions or xmlhttp request
  17. Yeah sure it will work for any kind of script that may be php/asp/.NET/Jsp
  18. Hi I am very sorry I don't have .rar files accessing. Can you send that as zip file and send me .sql file also where you want to insert.I mean table structure and all. You need the parser code in PHP only right?
  19. <html> <head> <title>JavaScript - Adding html elements dynamically</title> <script type="text/javascript"> var numrows = 0; function drawoptions() {   var tbl = document.getElementById("formtable");   var targetnumrows = parseInt(document.getElementById("numoptions").value + "");   // if they've selected to show more rows, then we add more rows   if(targetnumrows > numrows)   {       for(var i=0; i<targetnumrows - numrows; i++)       {           var row = tbl.insertRow(tbl.rows.length);           // create the name cell           var cell = row.insertCell(0);           var namefield = document.createElement("input");           namefield.setAttribute("type", "text");           namefield.setAttribute("id", "Name" + (numrows+i));           namefield.setAttribute("value", "field id : Name" + (numrows+i));           cell.appendChild(namefield);             // create the email cell           cell = row.insertCell(1);           var emailfield = document.createElement("input");           emailfield.setAttribute("type", "text");           emailfield.setAttribute("id", "Email" + (numrows+i));           emailfield.setAttribute("value", "field id : Email" + (numrows+i));           cell.appendChild(emailfield);       }   }   // they've decided to show less rows, so we remove some   else   {       for(var i=0; i<numrows - targetnumrows; i++)       {           tbl.deleteRow(tbl.rows.length - 1);       }   }   numrows = tbl.rows.length - 1;   document.getElementById("numoptions").value=tbl.rows.length;    //alert(numrows); } window.onload = drawoptions; </script> </head> <body> <form method="post" action="someformhandler.aspx"> Enter your friends names and email addresses<br /> Show <input type='hidden'  id="numoptions" value=1> <table id="formtable"> <tr><td colspan=2><a href="javascript:drawoptions();">add</td></tr> <tr>   <td>Name</td>   <td>Email</td>      </tr> </table> <input type="submit" value="Save"  /> </form> </body> </html>
  20. Can you please provide the sample file. I will write the code for parsing that file and i will send it to you.
  21. Please try these http://simplythebest.net/scripts/DHTML_scripts/javascripts/javascript_53.html http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=583
  22. I hope these two sites will be helpful. http://www.maxmind.com or http://www.geobytes.com which contains IP to geo lookup
  23. I hope you have made "item_code" as primary key. Please remove it .
  24. Give 775 permission for the directory in which you want to store this uploaded file.
  25. <?php // Connecting, selecting database $link = mysql_connect('localhost', 'dbusername', 'dbpassword') or die('Could not connect: ' . mysql_error()); mysql_select_db('dbname') or die('Could not select database'); //$message=stripslashes($_POST['txt_message']); $sql="select username from mytable where username='".$_POST['username']."' and password='".$_POST['pass']."'"; $rs=mysql_query($sql); $count=mysql_num_rows($rs); if(!$count) { $insertsql="insert into mytable (id,username,password) values(0,'".$_POST['username']."','".$_POST['pass']."')"; mysql_query($insertsql); header("Location:userhome.php"); exit; } else { echo "username alerady exists"; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <FORM METHOD=POST ACTION=""> <input type='text' name='username' > <input type='text' name='pass' > <INPUT TYPE="submit"> </FORM> </BODY> </HTML> Try this
×
×
  • 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.