Jump to content

birbal

Members
  • Posts

    2,543
  • Joined

  • Last visited

Everything posted by birbal

  1. birbal

    news page

    will be$poster=$_POST['poster']; "==" is conditional oprators and "=" is assignment oprators it is treating time() as string in double quotes either store it before in a variable then use it or concatenate the function in beetween the string whenerver you are not sure why database query is not working you can always use mysql_error() to check errors.http://php.net/mysql_error you can use LIMIT clause with DESCSELECT * FROM news LIMIT 5 DESC
  2. birbal

    Noscript?

    there is no relation with php and noscript tag. do you have the live page? or may be codes?
  3. http://au2.php.net/manual/en/configuration.php <= how php.ini config workshttp://au2.php.net/manual/en/function.ini-set.php <= changing configuration in runtimehttp://au2.php.net/manual/en/function.ini-set.php <= list of changable directives and possible values and its scopes in php.ini check thesehttp://au2.php.net/manual/en/errorfunc.configuration.php#ini.display-errors <= display error directivehttp://au2.php.net/manual/en/errorfunc.configuration.php#ini.error-log <= error loging directivehttp://au2.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting <= error level reporting directive http://au2.php.net/manual/en/errorfunc.constants.php <= type of errors in php in production server people use error loging to log errror in a file instead of displaying it in browser. the setting of php.ini is not same for producntion and development server. you may need to tweek it when nesceary. if you go throught this links you will probably get the concept. now or later you will need to get your hand dirty with this. if you have further question post it back here. we will try to help it out.
  4. I dont know about delphi and pascal and i did not use jsp so cant tell about them. most tough language will be assembly language as it is low level language. servlet is not language it is part of java. it is like applet difference is it runs on server except for browser. javascript,php,c++,java comes into object oriented language category. they also share lot of features. PHP JS JAVA do lot of the things which implictly to reduce headech of developer which you have to do it with manualy in C++. eg garbage collection. apart from that first three has a good documentetion of API which make it easier to learn and developing too.+ PHP+ JAVASCRIPT+ JAVA+ C++SQL is different from above it is used to query database. command itself are easy to learn but it implmentetion could be complex.XML is probably most easier among all of them for game programing mostly used C++ java for desktop base gaming. making game in C++ is tougher than java. java has image handling 2d/3d,thread etc api inbuilt. where in C++ you have to do those on your own (there may be third party libary or game engine for that though) javascript is widely use for web based gaming. php also used for gaming with javascript. if you intend for a good web absed game javsscript is essential. XML and SQL may used with them frequently.
  5. you can use isset() to determine which variable from the form has been passed. if it is set concatenate rest of the part like $qry.=" AND somecol='somdata'".
  6. no. (assuming your error.php serve custom error messages and it does not reveal credential explicitly). what i meant, is php runtime errors. eg. if your error level is permited to show all kind of errors and display it, in your php.ini, failure of mysql_connect will show the password username . and you should use .php extension to get file parsed. other extension may (depending in your server setting) not be parsed as php file. thus file will be served as plain text which will reveal credentials. .inc is used to indicate include files but it is better and safer to use .php for them also
  7. everything under php tag will be executed and wont be printed unless you do it explicitly. in some case showing php errors to browser could reveal the credential. send() expect a parameter as string when it send data using post.it is same as calling send(). null means nothing. it is not nesceary to use send(NULL) in js.
  8. did you replace the db credentials? what did you put in DB_HOST? btw remove the @ error supressor oprator which will help you to debug.
  9. wamp is package which includes apache webserver. probably Easyphp is also a package with apache webserver. sql server runing should nott have problem. they do listen to different ports. I have oracle,mysql,sqlserver runing on same machine. you cant have two webserver running on same machine. you need to choose IIS or apache. webserver do listen to same port thus that conflict occuring. i thought you are going to use iis and from your replies it seems that iis and php was runing well. i dont know what happend there after.first decide you want to run in iis or apacheif its apache you can use wamp (or easyphp like package) which will install all the things. it is the most easiest wayif it is iis then it would be same as we wrote earlier in previous posts
  10. your php and web server is running ok.can you see mysql diretive there down to the page?
  11. are you trying to connect with any other remote mysql server in that script?
  12. it must be a .php extension. eg what.php
  13. [quote name='CNT' timestamp='1332009283' post='234872']I am confused? I was just checking out the host's MySQL (called phpMyAdmin). It appears that the way it works is to create the DB on their website, instead of I create one at home with MySQL installed? Or is that how this one particular website (and others allow one to upload home-created DB to a host?)? Did I wasted my time with download/install MySQL on my laptop? I am just trying to understand... Chuck[/quote]phpmyadmin is not mysql database. it is a php application which let connect clients to their mysql server. when you will install a script or run a script you are goinf to use your host's phpmyadmin to manage your database. you still need to install mysql in your home server if you want to develop localy. mysql comes with a cmd which is not faster to use as phpmyadmin. so that you may like to download and install phpmyadmin for your home server too. you can export your database schema from it and can import it to your remote server.but before you do that you need to make sure your server is running and php is working fine. so first make a php script like[CODE]<?php phpinfo();?>[/CODE]place it in webroot then type http://localhost..what do you see?
  14. birbal

    Cookies & Login !

    how do you using cookie in other page? your cookie will be available in $_COOKIE suprglobal array did you check that cookie set properly? using cookie in authentication is not safe. any one can make a cookie to pretend to be authenticated. cookie can be created or edited. safest way is to use sssion. session also use session cookie but it works differently than normal cookie. http://www.google.co...5Qwpe8N-DwIfHFQ
  15. array_search() is case sensitive so that it is not matching. you can use str_ireplace() fo case insensitive replacement. rather than searching through the array you can directly replace the cid using str_ireplace(). if you need to determin the count of replacement occurance you can use the 4th param of that function. http://php.net/str_ireplace. that would be more efficcient. str_replace('cid:', '', $srcArr,$occurance);if($occrance===0)echo 'No cid affix found<br />';
  16. type http://localhost ot 127.0.0.1 in browser. do you see anything?
  17. sorry for that..yes you can forget about sql server for now and can start with installing wamp if you have not already installed it
  18. First of all if your development enviourment and production enviourment is same it will good. so if your production server is using mysql, it is best to install mysql in your development computer. Though ms server will also work fine. for mysql-php there is option for dlownloading package WAMP or XAMPP which will install apache php mysql. If you want to run on IIS you can also set up PHP and mysql manualy. once they are installed you can use mysql extension in your script. PHP has several API/abstraction layers which can communicate with mysql/msql/oracle and other databases. There is seprarte API for each databse server for mysql there is mysqli. MYSQLi stands for mysql imroved. there is also extension as but it is used for older mysql database. so if you are starting it is best to start with mysqli. you can also use [http://php.net/PDO]PDO which work as abstraction layer and can handle numerous of database.
  19. birbal

    backup your DB

    I cant see anything in your provided code which will cause to query the database and save it and compress it to zip. is that your complete code? Set the appropiate content-type header for zip file in email header
  20. AFAIK you have to pay everytime you will participate in exam
  21. mysql_real_escape_strin() returns escaped string which you need to store in some variable and later use that variable to get insert into db $content=mysql_real_escape_string($content, $db);
  22. the query is being broken for quotes you need to escape the inputs before its geting inserted into db using mysql_real_escape_string()
×
×
  • Create New...