Jump to content

colap

Members
  • Posts

    302
  • Joined

  • Last visited

Everything posted by colap

  1. Using unordered list, <ul> Reading from XML file, Taking menu name from database, Is there other system to make dropdown navigation menu? Which is the best way to make dropdown navigation menu? I also want to show the sitemap of navigation.How can it be done?
  2. How can i make/add facebook like on my website or blog? Can anyone post sample example code?
  3. I have created a blog. Now how can i add page hit option for that blog?
  4. Does ajax support multiple form submition? <input type="button" id="t" name="t" onclick="postform(a,b,c) ; postform(t,q,y);" />
  5. Does this work?(using textfile) http://www.plus2net.com/php_tutorial/php_counters.php
  6. The session_start() will be the first line i think.
  7. Get this here: http://www.phpfreaks.com/forums/index.php/topic,232740.0.html
  8. How is member rating assigned? Such as irregular for me php guru php devotee php enthausiest php freak etc . Where is that rule for this forum?
  9. index.php <html> <head> <title>myproject</title> <script type="text/javascript" src="dropdowntabs.js"></script> <script type="text/javascript" src="A.js"></script> <script type="text/javascript" src="f.js"></script> <link rel="stylesheet" type="text/css" href="b.css" /> <link href="Default.css" rel="stylesheet" type="text/css" /> <style> #topmenu{ width:600px; } </style> </head> <body> <div id="container" class="container"> <div id="header" class="header"></div> <div id="topmenu"> <div id="bluetab" class="bluetabs"> <ul> <li><a href="" rel="" title="Home" ><span>Home</span></a></li> <li><a href="" rel="dropmenu_soft" title="Software" ><span>Software</span></a></li> <li><a href="" rel="dropmenu_prod" title="Product" ><span>Product</span></a></li> <li><a href="" rel="dropmenu_docs" title="Documents And Tutorials"><span>Documents And Tutorials</span></a></li> <li><a href="" rel="" title="Forum"><span>Forum</span></a></li> <li><a href="" rel="" title="Blog"><span>Blog</span></a></li> <li><a href="javascript:runAjax('login.php','holder')" rel="" title="Login"><span>Login</span></a></li> </ul> </div> <div id="dropmenu_soft" class="dropmenudiv_b" style="width: 120px;"> <a href="student_allot.php">Windows</a> <a href="javascript:runAjax('a.php','Ajax')">Linux</a> </div> <div id="dropmenu_prod" class="dropmenudiv_b" style="width: 120px;"> <a href="javascript:runAjax('a.php','holder')">Sell</a> <a href="javascript:runAjax('a.php','holder')">Display</a> </div> <div id="dropmenu_docs" class="dropmenudiv_b" style="width: 120px;"> <a href="javascript:runAjax('b.php','holder')">Windows</a> <a href="javascript:runAjax('b.php','holder')">Linux</a> </div> <script type="text/javascript"> tabdropdown.init("bluetab", 0) </script> </div> <div id="holder" class="holder"></div> <div id="footer" class="footer"> Copyright 2009 </div> </div> </body> </html> If i click the login button , the login form will come in "holder" div. login.php <script type="text/javascript" src="A.js"></script> <script type="text/javascript" src="f.js"></script> <form id="log" name="log"> <table border="1"> <tr> <td>Username:</td> <td><input type="text" name="user" id="user"/></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="pass" id="pass"</td> </tr> <tr> <td align="center" colspan="2"> <input type="button" name="sbt" id="sbt" value="Login" onclick="post('logadmin.php','','log')"/></td> </tr> </table> </form> If i sumit typing username and password, it will print message "successfully logged in". How would i do that? There is no div with id "holder" in the login form. The div with id "holder" is in the first page (index.php) . How would i print the message "successfully logged in" in the first page "holder" div? How would i point to first page "holder" div from the login form page?
  10. Do you mean a new page will be loaded with new "echo <a href="" >..." if someone is logged in other nothing will happen. Is it?
  11. For example: this phpfreaks forum, If i login the login textboxes are gone and from navigation menu we have logout and other extra menus. How would i do this? Do i have to load whole new page or do i have to use Ajax to implement this?
  12. Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'www-data'@'localhost' (using password: NO) in a.php on line 10 Could not connect: Access denied for user 'www-data'@'localhost' (using password: NO) <?php class cl_Database { private $v_host="localhost"; private $v_user="root"; private $v_password="aaaaaa"; private $v_database_name="m"; public function fun_connect() { $con=mysql_connect("$v_host","$v_user","$v_password")or die('Could not connect: ' . mysql_error()); mysql_select_db("$v_database_name"); } } ?>
  13. <?php class cl_ { public function fc() { $host="localhost"; $user="root"; $password="aaaaaaaaa"; $database_name="a"; mysql_connect("$host","$user","$database_name")or die('Could not connect: ' . mysql_error()); mysql_select_db("a"); } } ?>
  14. Do i have to use '@' before mysql_connect and other fuction inside class? class mm{ $con=mysql_connect("$v_host","$v_user","$v_database_name")or die('Could not connect: ' . mysql_error()); }
  15. Searching i understand i have to create a Database.php file where there will be functions for conneting database,inserting,selecting,deleting,updating,disconnecting database etc. In the current .php file i would invoke the Database.php file creating object of Database.php file's class. Now my question is , "Is it possible to make it fully object oriented php"? That means from the current .php file, how would i call the functions of Database class? If i make a class from the current .php file, where would it start to execute php code from? As there is no main function or starting point in php file like C programming language of Java language. I have to make an object outside a class to call the functions of Database.php file's class.Am i right? If it's true , it's not possible to make it completely object oriented.Is it?
  16. <?php session_start(); mysql_connect("localhost","root","")or die('Could not connect: ' . mysql_error()); mysql_select_db("m"); $var=$_POST['ur']; $var2=$_POST['p']; $q="select * from table where col1='$var'"; $result=mysql_query($q) or die('Query error: '.mysql_error()); $c=mysql_num_rows($result); if($c==0) { echo "Wrong"; } else { echo "Success"; } ?> Is it possible to convert it to object oriented php?
  17. linux=linux operating system /var/lib/mysql
  18. I have extracted cake_1.2.5.tar.bz2 to /var/www and renamed it to cakephp . Now how would i start to develop a project with cakephp? I'm also reading this:http://book.cakephp.org/view/15/Controller-Extensions-Components but can't understand how to start with this. Can someone guide me to start?
  19. Is there any php function to find total number of column of a mysql table? I also want to check if the length of a value of a column/row is zero or not. How can i check this if the column is of different type? One column is of varchar(10) and other is date type.
  20. How can i do this with php? Can anyone give me some idea?
  21. I have used both document.location.href and document.location in a web page. Both work.
  22. Can you please post your whole code?
  23. http://www.w3schools.com/PHP/php_mysql_select.asp
×
×
  • 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.