Search found 92 matches

by ScTech
Thu Oct 24, 2013 1:01 pm
Forum: General Chat
Topic: php.net hacked
Replies: 2
Views: 4620

php.net hacked

Php.net has been hacked today. Roughly 5 hours ago it was flagged by all major browsers and google as malware. The attacker injected obfuscated javascript through a gateway into their userprefs.js file. You can read more here . The javascript roughly deobfuscates to: [syntax=javascript] tmp3 = (tmp2...
by ScTech
Wed Oct 23, 2013 10:16 pm
Forum: General Chat
Topic: looks like we have a few spam bots lol
Replies: 7
Views: 5304

Re: looks like we have a few spam bots lol

It's always nice to help people :) I've joined many PHP help sites, but none of the people on them are nearly as friendly as here.

Hopefully we can get jacek back soon too to kick up the activity around here too.
by ScTech
Wed Oct 23, 2013 10:12 pm
Forum: Tutorials
Topic: DELETE FUNCTION
Replies: 13
Views: 4103

Re: DELETE FUNCTION

Use $post['post_id'] since it contains the post's id from the returned array in your function.
by ScTech
Wed Oct 23, 2013 3:51 pm
Forum: Tutorials
Topic: DELETE FUNCTION
Replies: 13
Views: 4103

Re: DELETE FUNCTION

Did you change $_POST['action'] to $_GET['action'] and include the post id in the href like delete.php?action=delete&post_id=your_post_id
by ScTech
Wed Oct 23, 2013 3:21 pm
Forum: General Chat
Topic: looks like we have a few spam bots lol
Replies: 7
Views: 5304

Re: looks like we have a few spam bots lol

Thank you indeed temor ;)
by ScTech
Wed Oct 23, 2013 11:21 am
Forum: Tutorials
Topic: DELETE FUNCTION
Replies: 13
Views: 4103

Re: DELETE FUNCTION

When using links, it uses the $_GET superglobal. Not $_POST. Also note you will need to include the post id in the link as well for what you're trying to do to work.
by ScTech
Wed Oct 23, 2013 11:19 am
Forum: Code
Topic: BBCode - How to?
Replies: 7
Views: 2917

Re: BBCode - How to?

It's an absolute pain to get wrapping to work on mobile and IE. I can understand why mobile, but not why people still use IE...
by ScTech
Tue Oct 22, 2013 9:41 pm
Forum: Tutorials
Topic: MySQL Security
Replies: 8
Views: 4425

MySQL Security

Note: This guide will somewhat teach you the basics of prepared statement queries and how using them with normal queries is not safe. It will also teach you why using mysql_real_escape_string can not fully protect you against SQL Injection. Jacek did a good job explaining the basic query scenario bu...
by ScTech
Thu Oct 17, 2013 2:25 am
Forum: PHP
Topic: JSONAPI is driving me insane...
Replies: 5
Views: 2828

Re: JSONAPI is driving me insane...

There have been issues reported to their bukkit page on this. One person seems to have a solution however.

" Alec changed the API but forgot to edit the librairies, so just put use-new-api to false in the configuration of the plugin."
by ScTech
Wed Oct 16, 2013 6:08 am
Forum: PHP
Topic: JSONAPI is driving me insane...
Replies: 5
Views: 2828

Re: JSONAPI is driving me insane...

From a glance it looks like you forgot session_start();

EDIT: One more edit ;) If session_start(); is not your issue, the API docs shows that it returns "string[]". I assume they mean an array by the brackets? You can try using var_dump() or print_r().
by ScTech
Fri Oct 04, 2013 4:26 am
Forum: PHP
Topic: Multi Field Search
Replies: 1
Views: 2025

Re: Multi Field Search

It looks like your preg_split() may be a little messed up. I'm not very good with regex. Why not just use: [syntax=php]<?php $keyword = explode(" ", $term); ?>[/syntax] If it's an extra spaces issue you're worrying about, which it looks like it may be, you can use trim() to remove extra wh...
by ScTech
Mon Sep 30, 2013 2:03 am
Forum: Code
Topic: BBCode
Replies: 10
Views: 4624

Re: BBCode

This is a very basic method. It will not wrap around highlighted text. Replace [\b][\/b] with whatever you want your bbcode to display [syntax=xhtml]<a href="#" onclick="document.getElementById('your_textarea_id').value += '[\b][\/b]'">Bold</a>[/syntax] Instead of using the hash...
by ScTech
Fri Sep 27, 2013 8:16 pm
Forum: Code
Topic: BBCode
Replies: 10
Views: 4624

Re: BBCode

This is a very basic method. It will not wrap around highlighted text. Replace [\b][\/b] with whatever you want your bbcode to display
[syntax=xhtml]<a href="#" onclick="document.getElementById('your_textarea_id').value += '[\b][\/b]'">Bold</a>[/syntax]
by ScTech
Fri Sep 27, 2013 5:40 pm
Forum: Code
Topic: BBCode
Replies: 10
Views: 4624

Re: BBCode

Just call the function. [syntax=php]<?php echo bbcode($your_text); ?>[/syntax] You can edit all the replacements in there by just editing the corresponding lines in both arrays. The extra slashes are just to make the preg_replace work. It's like any other bbcode with it seems a bit extra. There is o...
by ScTech
Fri Sep 27, 2013 3:43 pm
Forum: PHP
Topic: frame or iframe?
Replies: 7
Views: 3302

Re: frame or iframe?

Are you saying that you want to learn how to make one from scratch, or want one that is open source?

If you want to learn, there is a nice example of how to convert BBCode from text to HTML via PHP in this thread.
by ScTech
Thu Sep 26, 2013 4:51 pm
Forum: PHP
Topic: frame or iframe?
Replies: 7
Views: 3302

Re: frame or iframe?

Iframe is HTML to show contents of another page in the page you are viewing. Iframes are not very safe security wise so you should only use them when the page you want is trusted, and there is no other way but to use iframes. I'm not sure what the difference between iframe and frame are because I've...
by ScTech
Thu Sep 26, 2013 1:58 pm
Forum: PHP
Topic: how to convert MySQL to MySQLi
Replies: 8
Views: 4042

Re: how to convert MySQL to MySQLi

Need to see the query for it. Based on the ternary operator, you could probably use mysqli_num_rows();
by ScTech
Wed Sep 25, 2013 9:37 pm
Forum: General Chat
Topic: Kickstarting the activity here.
Replies: 45
Views: 18747

Re: Kickstarting the activity here.

I can't tell because I'm on a tablet and my view source app keeps crashing when trying to open the page...but it looks like JQuery showing a hidden div. [syntax=javascript]$("#password_field").onclick(function() { $("#password_hint_div").animate(); // or show(); with slidein or s...
by ScTech
Wed Sep 25, 2013 1:52 am
Forum: General Chat
Topic: Kickstarting the activity here.
Replies: 45
Views: 18747

Re: Kickstarting the activity here.

Pretty sure that footer is just css. I could be wrong. The link to the password thing is invaid.
by ScTech
Sun Sep 22, 2013 5:28 pm
Forum: Tutorials
Topic: Asking for help !!!!
Replies: 2
Views: 1540

Re: Asking for help !!!!

I'm not sure what the exact question about software is, but as far as I know, there is no legit way to increase traffic unless you advertise your site. Those "instant traffic" sites are either scams, or just send bots to your site.
by ScTech
Fri Sep 20, 2013 3:43 am
Forum: Tutorials
Topic: Auto thumbs image gallery
Replies: 3
Views: 1773

Re: Auto thumbs image gallery

As of PHP version 5.2.3, read errors were downgraded to notice level. Try displaying everything.
[syntax=php]
error_reporting(E_ALL);
ini_set('display_errors', 1);[/syntax]