Search found 35 matches

by ykarmi
Tue May 27, 2008 5:42 pm
Forum: PHP - Code
Topic: Include Class inside another Class
Replies: 2
Views: 100

Include Class inside another Class

Hey Guys, This is a pretty newbie question but my google keyword skills did not seem to help. I am very new to OOP - I used to do everything procedural until not a long time ago. I have a database class that I use to connect and talk to my database. I have another class (user class) which is suppose...
by ykarmi
Mon Apr 07, 2008 5:51 pm
Forum: PHP - Code
Topic: Problem with sql insert quesry
Replies: 3
Views: 117

Re: Problem with sql insert quesry

You are defining a query variable but you never execute it. If you want to send this command into the mysql database you gotta do this $query = "INSERT INTO score (scoreID, username, score, quizID) VALUES (null, '$username', '$noCorrect', '$quizID')"; mysql_query($query); In order to verif...
by ykarmi
Mon Apr 07, 2008 5:41 pm
Forum: PHP - Code
Topic: Foreach Loop Fails
Replies: 1
Views: 109

Foreach Loop Fails

Hey Guys, I wrote this PHP to clean up data before i enter it into a mysql database This is the code: function mysql_sanitize($input){     //Cleans the input for proper mysql_insertion     function specific_input_sanitize($input){         if(get_magic_quotes_gpc()){ $input = stripslashes($input);}  ...
by ykarmi
Sun Aug 12, 2007 12:10 pm
Forum: PHP - Code
Topic: subject
Replies: 4
Views: 497

subject

message
by ykarmi
Sat Aug 11, 2007 11:34 pm
Forum: PHP - Code
Topic: subject
Replies: 4
Views: 497

subject

message
by ykarmi
Sat Aug 11, 2007 10:48 pm
Forum: Regex
Topic: Strip double <br>'s?
Replies: 12
Views: 2556

Strip double <br>'s?

Hey Guys, I have a document with different lines. I have double line breaks (<br>) between some lines and some lines with just one line breaks between them, like this: word<br> word<br><br> hello<br> anotherword<br><br><br> goodword<br> I'm trying to write a regex syntax to leave me with only one <b...
by ykarmi
Sat Aug 11, 2007 10:43 pm
Forum: Regex
Topic: Warning: Unknown modifier ']' in /usr...
Replies: 4
Views: 1503

Thank you!

Thank you very much. That completely solved the problem. Does PHP not accept regex inside single quotes?
Thanks!
Yuval
by ykarmi
Sat Aug 11, 2007 9:18 am
Forum: Regex
Topic: Warning: Unknown modifier ']' in /usr...
Replies: 4
Views: 1503

Warning: Unknown modifier ']' in /usr...

Hey Guys, Quick question, I'm trying to run the following script on my website $content = '<br>hello</br>'; $content = preg_replace('<[^>]+>','<br>',$content); echo $content; But I get Warning: Unknown modifier ']' in /usr... What's going on? Here's a php info page: http://www.ykcreations.com/tibiaW...
by ykarmi
Mon May 28, 2007 3:16 pm
Forum: PHP - Code
Topic: Download html source code using a PHP file?
Replies: 2
Views: 351

Download html source code using a PHP file?

Hey guys! Here's what I want to do: I want to create an RSS feed (for self-usage) for a website I do not own - what I intend to do - is download the source code from the website I want to information from - and then run a replace string to <a href=""> on there and replace it with xml tags ...
by ykarmi
Tue Jan 30, 2007 11:32 pm
Forum: Databases
Topic: Error that doesn't exist!!!! <---------------------
Replies: 2
Views: 637

Error that doesn't exist!!!! <---------------------

Hey guys, I get the following error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''fname', 'lname', 'address', 'city', 'zipcode', 'amount') VALUE: INSERT INTO tbuserinfo ('fname', 'lname', 'address', 'city', 'z...
by ykarmi
Tue Jan 30, 2007 8:19 pm
Forum: PHP - Code
Topic: What is ->
Replies: 10
Views: 1194

Nice

Interesting reply! =)
lol, so this is defined by the class as new classConstructor(), then it is being used to access the class?
I think i'm confused, why would someone want to use $this?
by ykarmi
Tue Jan 30, 2007 8:11 pm
Forum: PHP - Code
Topic: What is ->
Replies: 10
Views: 1194

Thank you!

Thank you!
Didn't think of googling that, "operator arrow" lol - i wasn't sure that was the name, but thinking about it, it was worth the try...

Anyways, why would someone write $this->_classVar
what is the $this - is it preset by PHP or something someone coded?
Thank you!
Yuval :D
by ykarmi
Tue Jan 30, 2007 8:02 pm
Forum: PHP - Code
Topic: What is ->
Replies: 10
Views: 1194

What is ->

Hey guys, I tried googling it, but google wouldn't accept the string "->" so i couldn't find out without asking.
What is the sign -> in php?
For example:
$logger->_log('You are not logged in; return to index.php');
What does the arrow do?
Thanks!
Yuval :D
by ykarmi
Thu Jan 11, 2007 2:13 pm
Forum: Databases
Topic: Replace Info in a single cell! --> I'm almost giving up!
Replies: 5
Views: 771

Ohhhhhh

Ohhhhhhhhhhh, So you can't select the cell right away?
You have to get the row, then select the cell out of the row?
I'll definitely give it a try and let you know how it worked.
Thank you sooooooo much! :P :P :P
Yuval :D
by ykarmi
Wed Jan 10, 2007 11:02 pm
Forum: Databases
Topic: Replace Info in a single cell! --> I'm almost giving up!
Replies: 5
Views: 771

Replace Info in a single cell! --> I'm almost giving up!

I searched and searched and read the W3Schools tutorials, fluffycat.com tutorials, different references and mainly Google (*ahm* Ole *ahm* :wink:) but I just COULDN'T FIND AN ANSWER!!! :roll: - how to replace information in a single cell? What bothers me the most, is that INSERT doesn't have a WHERE...