Jump to content

birbal

Members
  • Posts

    2,543
  • Joined

  • Last visited

Everything posted by birbal

  1. what is your question actually?
  2. php cant decide which double quotes is for literal value. you need to escape the inside quotes to treat them as literal value"while (1) alert (\"Gotcha!\");"
  3. it sounds like you need to check ajax
  4. I am not sure what you re trying to do, if you want to pause script execution for certain amount of time there is a function for that http://php.net/sleep
  5. yes you need to install php as well as a webserver like apache. best will be if you install package LAMP,MAMP,WAMPfor linux,mac,wins or XAMPP
  6. when you need to talk with database you must use to server side language like php. clientside languages cant handle databases directly. if you had not any experiance with php. reading the basic from the w3s tutorials would be best place to start. for databse handling you can check http://php.net/pdo
  7. http://in.php.net/manual/en/simplexmlelement.construct.php if it is GET you can send directly a GET request from simplexml by specifying file URL in first param in constructor followed by passing true to third param and then fetch the xml document.
  8. birbal

    PHP version support

    You dont need to change whole code if you are upgrading version. As previous version are usually compatible with later versions (forward compatibility). You may need to change some setting though. You can check change log of version from php.net and see what is the differences of both version and can decide if it needs to make changes or not. It is always best to be same enviourment of you development server and production server. before deploying your application you should run and test it in you development server with same version of php as is in your host. There is no need to use php 4 anymore. There is reason they upgrade it everytime. why not taking advantage of better php?
  9. 'UNION' two queries .first one will group by part where part is either A or B and SUM() in qty.second will simply select all data where part is not A or B
  10. SELECT part,SUM(qty) as quantity,date FROM table GROUP BY part
  11. h1 small{color:red;} bold part is selector. it selects the nodes which you want to get styled. inside curly braces you will put styling information. 'h1 small' tells select small tag which is inside h1 tag and it will make 'red' and [class*=span] is not wild card. check the page linked to read more information.
  12. what will you do with that text? color,font,text can control the appearance of texts of target node.
  13. condition is failing in query. so it is returning empty resultsefor thishere $e_mail is empty. check where does the variable getting its value and why it is having empty string. also make sure you have "error_reporting" enable to E_ALL
  14. birbal

    SQL error

    sql error will tell where the error is. if gdate is date type the format is YYYY-MM-DD. if picture column is location of thumbnail it should be char/varchar or other textutal type. if it is the image itself it has to be stored as binary type
  15. what is the previous line of it? if syntax error pointing to that line,that does not always mean problem occured in that line, it could be in previous line (like missed semicolon)
  16. yes, as session id also sent as cookie and sent with header it will show same error.
  17. if you have category table separated with topic table, you can first join two tables and then use GROUP BY on category id with COUNT() on topic id
  18. check here http://w3schools.invisionzone.com/index.php?showtopic=44106
  19. so that you know using table is not suitable for page layout you should use newer cleaner "box model" approach. http://w3schools.com/css/css_boxmodel.asp table should be limited to show tabular data. not page layouts.
  20. $name is variable (with '$' sign) which will evaluate value in the double quoted string. and that value is coming from $_GET['name']. $_GET['name'] is populated from the query string you used to get the page. variable names always stars with '$' sign in php
  21. you need to use any server side lanugage for that. php is the most popular and preferable one though there is other languages too.
  22. what do you mean it does not work? is there any errors? if you are unsure how is your query is geting built you can echo $query to see it.
  23. if you use php there is http://php.net/include for that. js has not anything like that "include" you can get seprate file using ajax or load different script using DOM methods but that is not suitable for that. you should move on to any server side solution.
  24. http://w3schools.com/php/php_mysql_intro.asphttp://dev.mysql.com/doc/en/select.htmlhttp://w3schools.com/php/php_mysql_select.asphttp://w3schools.com/php/php_mysql_where.asp
×
×
  • Create New...