Jump to content

birbal

Members
  • Posts

    2,543
  • Joined

  • Last visited

Everything posted by birbal

  1. birbal

    Next step?

    It would be same but if you store the sql in variable you will be able to print it out when you will need to debug so that you can study how your query and its values being evaluated. it will be same when you will pass $sql to mysql_query($sql);
  2. here is the referene for id3() http://in2.php.net/m...n/intro.id3.php but it looks like its for mp3. one way is you can unpack() the file contents and decode its bits as per file format specifications. you have to do some research on file specifiation which you want to decode. each of them probably have different rules. http://php.net/unpack
  3. you need to use js. you can bound a onchange event in select and check its value when event trigger if it matches lips either you need to create a node of textarea using js dom or you can have a existed hidden textarea and you need to have visible.
  4. what were you expecting? what is not working? what is happening instead?
  5. i am not sure about this loop and what is it doing here.echo "Uw totaal score is: <span id='total_score' name='span[]'></span>"; move this part inside foreach loop
  6. if query is not working let see why it is not working. print out the error of mysql if mysql_query() rfeturn false which means its failing. $result = mysql_query($sql);if(!$result)echo mysql_error();
  7. what does it exactly prints? can you post that?
  8. birbal

    Where ....?

    export a db out of where? if you mean exporting a db and the importing it to other database, then yes. yes its possible. you need to use ajax. but i dont think you need to get into that now.
  9. we need to see the final code.
  10. you could pass an array in construtor which will initialize its value by looping it. something like public function __construct($param=array('db'=>'dbcredential','customer'=>'some name','event'=>'spme event')){ foreach($param as $key=>$value){ $this->$key=$value;}} if you want that no other property be set rather than the property you initialized at first you ,can use isset() in loop before assigning the value
  11. $handle = opendir(dirname(realpath(__FILE__)).'/uploads/'.$id.'/');$num=0; while($file = readdir($handle)&&$num<6){ ++$num; if($file !== '.' && $file !== '..' && $file !== 'index.html'){ echo '<a href="uploads/'.$id.'/'.$file.'"><img src="uploads/'.$id.'/'.$file.'" border="0" style="padding:10px;" height="100px" width="100px" /></a>'; } }
  12. what do you mean by image of database? there is no such thing image of database. only way to show a working database is developing a working application.
  13. inside your foreach loop where you lopp throgh all the files
  14. birbal

    Error?

    why dont you try runing it? it should not be quoted if the field is integer.
  15. you have to put your username and password there. probably it is username=root and password is blank.
  16. you want to do that dynamicaly?
  17. birbal

    How can I fix this?

    use backtick around $query1. its better though to avoid integer column name. use a descriptive name instead.
  18. birbal

    How can I fix this?

    it looks like $query1 is evaluating a number . print out $sql3 to see what the query looks like and to be sure.
  19. birbal

    How can I fix this?

    i assume $number1 is int field. if it is like so remove the quotes around it. $sql3= "UPDATE lottomax SET $query1=$number1"; and you dont need to use concatenate oprator inside double quotes value of variable wil be evaluated itself
  20. can you post your updated code?
  21. i updated my post above. did you see it?
  22. ok. what happened when you ran it? does it show any errors ? i can see the insert example does not have any debugging code. you can check mysql_query() return value that if it successfull or not. if failed echo the reason using mysql_error() $res=mysql_query("INSERT INTO Persons (FirstName, LastName, Age)VALUES ('Peter', 'Griffin',35)"); if(!$res)echo mysql_error(); http://php.net/mysql_error
  23. birbal

    I Tired...

    page not found error-404your page is missing.
  24. which scripts did you test? can you post the link? genraly you need to create database and tables from phpmyadmin and then use php to pull and push data inside it.if you have come up any code ,posting would be helpfull too.
  25. birbal

    Web Address validation

    ..also instead of the above regex you can substitute it using trim(). it accepts a character list which will be striped as second param. regex is costly for memory so it is best to use regular string functions where possible. for valid url a regex would be something like. i did not added all extension,protocols,domains. you may need to tweak it where nesscery. ^(http||ftp)s?://([\w]+)?.[\w]+.(com|in|net|org)/?([\w/]+)?([\w]+.jpg|php|html)?$
×
×
  • Create New...