Jump to content

firelior

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Everything posted by firelior

  1. I didn't read it all, but I think that the problem is caused because you print all the stuff inside a post if..and when you click the link the post doesn't exist. so what you need to do is add an OR cause to the first if, with the statement "isset($_GET)"...
  2. you can use preg match. Learn about it..but here is a code: preg_match("/[sTART](.*?)[END]/",$content,$match);
  3. Hi, I want to do a Paypal Express Checkout option on my site. I want the credit card payment to go "through my site" using the Paypal Express Checkout. It says that I need API experience-if I know php well, is that enough? I tryed to read all the PDF files that they give, but there is no actual example with open source code. Has anybody done it? can anybody tell me how to do it? it says that I need to get the token, but it doesn't say how... does anybody use any other credit card method? thank you:)
  4. whats the .htaccess code? anybody knows?
  5. I have a question, Is it possible to upload stuff to a folder, and that still no-one could see it? I want to upload stuff using php, and I don't want anybody to be able to see the folder directly.. with permissions 777 it doesn't work. how do i do it? thanks
  6. Hi How is this name: SpotBid for a freelancer site?(like getafreelancer, or elance) what do you think? if you don't like it..got any other ideas? thanks
  7. thank you both I did it barands way thanks
  8. Hello, I have 2 tables: items id | cats_id | title cat id | pid | title : This is the value inside cats_id 1|11|2|5|6 those values are the ids of the cat table Now, say I have the an item from the items table How can I get all the names from cats table in one query? And how say I have a category, How can I get the number of items that belong to that category? I know that it isn't a good way of doing it. Can you tell me of a good way to do it? Thank you very much..
  9. I want to update my mysql database at a specific time. I want something to update my database at a time that I specify, but not a specific time. I want it to update lets say, every saturday. But I want to be able to set it my self in my admin panel. And not to go into the server and change it manually.. is it possible for me to set a time in which some script activates a function that I have? thanks
  10. found the problem.. i just changed the field type to varBINARY
  11. ok, [b]huggy[/b]: what it does is this: [code]Couldn't execute SELECT * FROM cars WHERE `area` LIKE '%ירושלים%': Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'like'[/code] and ray..it doesn't work. its still the same
  12. Hi, I have this: [code]SELECT * FROM cars WHERE `area` LIKE '%ירושלים%'[/code] which is in hebrew. now. when I enter this through the phpmyadmin I don't get any error but when I do this: [code] $sql="SELECT * FROM cars WHERE `area` LIKE '%ירושלים%'"; $result = mysql_query($sql); while ($row = mysql_fetch_object($result)) {       echo $row->id; } [/code] I get this error: [code]Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource[/code] Please help. THANKS
  13. while $row=mysql_fetch_object($result){ $rank=$row->rank; if $rank==1{ $rank=$rank."st"; } if $rank==2{ $rank=$rank."nd"; } if $rank==3{ $rank=$rank."rd"; } else{ $rank=$rank."th"; } }
  14. Hi, I got this code: [code] <? session_start(); ######################### ##Here it always exits!## ######################### if(isset($_COOKIE['username']) || isset($_COOKIE['password'])){ exit(<p><a href="login.php?log=1">logout</a>); } //here it should log out if(isset($_GET['log'])==1){ setcookie ("username", "admin", time() - 4000); setcookie ("password", "admin", time() - 4000); } if(isset($_POST['username']) || isset($_POST['password'])) { if($_POST['username']==$Ausername || $_POST['username']==$Apassword) { if(isset($_POST['remember'])) { @setcookie("username", $_POST['username'], time() + 3600); @setcookie("password", $_POST['password'], time() + 3600); $_SESSION['username']=$Ausername; $_SESSION['password']=$Apassword; } else { @setcookie('username', $_POST['username']); @setcookie('password', $_POST['password']); $_SESSION['username']=$Ausername; $_SESSION['password']=$Apassword; } } else die($lang->invalidup.'<p><a href="login.php">Go Back</a>'); } else { echo " <form method='post' action='login.php'> Username: <input type='text' name='username'> <br>Password: <input type='password' name='password'> <br><input type='checkbox' name='remember'>Remember me on this computer <p><input class='button' type='submit' value='Login'> </form> "; } ?>[/code] Now, My problem is that it always exists in the line I told you above.. I cant destroy the cookie. Please help me destroy the cookie thanks!!
  15. Hi, I was wondering, if I do login system with this code: [code] if(!isset($_COOKIE['password']) || !isset($_COOKIE['username'])){ exit("Wrong Username Or password"); } [/code] is it good to do this in every page? so it will check if the user is logged in or not...or is there another way to do this? with session or something?
  16. thanks, never mind i solved it: [code] foreach ($option as $key => $val){ foreach ($val as $key => $val1){ echo "<option>$val1</option>"; } }[/code] but i got another problem a little one how do I test if one is an integer(number) and one is a string?
  17. hi again, well it doesn't work, because elements = Array ( [ 0 ] => Array ( [id] => 1 [name] => firelior ) ) and what you did is return an array not "1" or "firelior"
  18. Hi, I got this array: [code] while($row = mysql_fetch_assoc($result)) { $elements[] = $row; }         return $elements; [/code] now I want to extract it. I don't have the database or anything I tryed this: [code] $option=$elements; foreach ($option as $key => $val){ foreach ($option as $val){ echo "<option>$val</option>"; } }[/code]
  19. never mind fixed the problem..here is the fixed: [code] function check_id($id){ $sql="select * from ".$this->table." where id= ".$id; $result=mysql_query($sql); while($row=mysql_fetch_object($result)){ if($row->id==$id){ return true; } return false; } return false; }[/code]
  20. I am getting this error: [code]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in[/code] and also, it doesn't check if the id exists:|
  21. Hi, I got a problem, I want to check the id that im sending via $_GET and I want to check if it exist this is my code: [code] function check_id($id){ $sql="select * from ".$this->table." where id= ".$id; if(mysql_query($sql,$this->link)){ if($row=mysql_num_rows($sql)==1){ return true; } return false; } return false; }[/code] please help thanks
  22. wow! thanks! :D great forum. I am staying here 100%. Thanks Barand,Daniel0
  23. thanks for your fast answer, i did a multi dimentional array because i want more things other then title for example [code] $result = mysql_query("select id,title from content"); while($row = mysql_fetch_object($result)){     foreach ($row as $key => $val){       $elements[]=array($key => $row->$key);     } } [/code] now there is a problem. I want it to write something like this: [code]elements=array(array('title' => 'home','id' => 1),array('title' => 'news','id' => 2));[/code] but it doesn't..any help? thanks!
×
×
  • 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.