Search found 205 matches

by ExtremeGaming
Thu May 02, 2013 1:40 pm
Forum: PHP
Topic: Upload image file to two directories php
Replies: 4
Views: 1037

Re: Upload image file to two directories php

I can't see your flowchart very well, but here is a basic explanation of uploading. Feel free to ask any other questions towards the subject. You're going to need to first work on security. Uploading is a very very dangerous thing if exploited (they can access all of your files). Look into the $_FIL...
by ExtremeGaming
Wed May 01, 2013 1:05 pm
Forum: JavaScript
Topic: JQuery Chat Kick/Ban
Replies: 2
Views: 1851

Re: JQuery Chat Kick/Ban

Ok. Thanks for your help. I'm almost done now I chose 30 seconds since I'll be checking in the PHP as well, and just die with json_encode and use javascript to tell them they are banned/kicked if they are. I've got all the functions set up, except a way to automatically ban without manually insertin...
by ExtremeGaming
Sat Apr 27, 2013 2:49 pm
Forum: Tutorials
Topic: PHP Tutorial: Blog (Including Commenting) [part 04]
Replies: 9
Views: 4849

Re: PHP Tutorial: Blog (Including Commenting) [part 04]

If blog_post.php is exactly as you have it, there is no processing to it. You aren't calling add_post() anywhere, or validating anything.
by ExtremeGaming
Fri Apr 26, 2013 7:13 pm
Forum: Tutorials
Topic: PHP Tutorial: Blog (Including Commenting) [part 04]
Replies: 9
Views: 4849

Re: PHP Tutorial: Blog (Including Commenting) [part 04]

JavaScript styles will not prevent data from being entered. There must be errors in your query.
by ExtremeGaming
Thu Apr 25, 2013 4:23 am
Forum: PHP
Topic: Blog/comments integration with login
Replies: 7
Views: 1721

Re: Blog/comments integration with login

That error means that uid isn't present in the url. Make sure you check if it exists first.

[syntax=php]<?php
if(isset($_GET['uid'])) {
$user_info = fetch_user_info($_GET['uid']);
} else {
die("uid is not set");
}
?>[/syntax]

The URL should look like home.php?uid=1234
by ExtremeGaming
Thu Apr 25, 2013 4:21 am
Forum: General Chat
Topic: Google
Replies: 2
Views: 4232

Google

Lol a friend told me to google this. Google makes me laugh :)

Google.png
Google.png (162.46 KiB) Viewed 4232 times
by ExtremeGaming
Mon Apr 15, 2013 11:04 pm
Forum: PHP
Topic: Checkbox Toggle
Replies: 2
Views: 730

Re: Checkbox Toggle

You're going to need to use the php date function.

[syntax=php]<?php
If($row['date'] == date(stuff)) {
// use the checked property of the checkbox
} else {
// use a normal checkbox
}
?>[/syntax]
by ExtremeGaming
Mon Apr 15, 2013 11:01 pm
Forum: PHP
Topic: Blog/comments integration with login
Replies: 7
Views: 1721

Re: Blog/comments integration with login

Just use the $_SESSION username when inserting into the database.
by ExtremeGaming
Mon Apr 15, 2013 1:08 pm
Forum: JavaScript
Topic: JQuery Chat Kick/Ban
Replies: 2
Views: 1851

JQuery Chat Kick/Ban

I'm wrapping my head around a kick/ban feature for a chat I'm working on. My only question, is if I were to create a simple JavaScript function like... [syntax=javascript]function check(){ $.ajax({ type: "GET", url: "check.php", data: { 'function': 'check' }, success: function(da...
by ExtremeGaming
Mon Apr 15, 2013 12:08 pm
Forum: Tutorials
Topic: PHP Tutorial: Private Message System [part 04] HELP!
Replies: 4
Views: 1856

Re: PHP Tutorial: Private Message System [part 04] HELP!

It's not going to help much without the necessary files. There is not enough information to establish a basis.
by ExtremeGaming
Fri Apr 12, 2013 1:01 pm
Forum: JavaScript
Topic: Insert Automatic Date Into Table Via Button
Replies: 2
Views: 1400

Re: Insert Automatic Date Into Table Via Button

Here is an example to get you started. Follow the comments and you should be fine. [syntax=xhtml]<html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { // Whe...
by ExtremeGaming
Wed Apr 10, 2013 12:55 pm
Forum: CSS / Styling
Topic: Change background color according to sql entry
Replies: 1
Views: 1157

Re: Change background color according to sql entry

You will need to query your database, and then just use the info to change the css in the head according to the results. [syntax=php]<?php // $row is from mysql_fetch_something() // And of course you would have a default theme using else, but this is just an example if($row['theme'] == "sleepin...
by ExtremeGaming
Thu Apr 04, 2013 6:31 pm
Forum: Tutorials
Topic: User Account System: HTTP Error 500 (Internal Server Error)
Replies: 14
Views: 2150

Re: User Account System: HTTP Error 500 (Internal Server Err

Tough one. It's most likely some small detail. 1. Make sure there are no spaces before the opening <?php tag. 2. You can remove the error reporting on any page already including init.inc.php 3. You still have backticks around the numbers in user.inc.php. You can leave them as numbers. No need for qu...
by ExtremeGaming
Mon Apr 01, 2013 7:59 pm
Forum: General Chat
Topic: Bettar spell chek!
Replies: 4
Views: 4686

Re: Bettar spell chek!

And the "YouTube shut down." Google went all out this year
by ExtremeGaming
Sun Mar 31, 2013 4:31 pm
Forum: PHP
Topic: Trouble in PHP adventures =/
Replies: 6
Views: 1118

Re: Trouble in PHP adventures =/

Are the required ports open?
by ExtremeGaming
Sat Mar 30, 2013 10:22 pm
Forum: PHP
Topic: XSS
Replies: 1
Views: 553

XSS

It seems I've come into a tricky situation with XSS where a user can use "javascript:something" to execute an XSS attack. Obviously htmlentities() does not work here. I could just replace "javascript:" with something else, however, that will not work because of some browsers. (Ex...
by ExtremeGaming
Tue Mar 26, 2013 9:03 pm
Forum: Tutorials
Topic: User Account System: HTTP Error 500 (Internal Server Error)
Replies: 14
Views: 2150

Re: User Account System: HTTP Error 500 (Internal Server Err

You completely mistook that unfortunately, and now quite clear you don't have error reporting on. Put this snippet at the top of your php on each page: [syntax=php]error_reporting(E_ALL); ini_set('display_errors', '1');[/syntax] Also undo all the backticks: ` except on column names and tables names ...
by ExtremeGaming
Tue Mar 26, 2013 12:20 pm
Forum: Tutorials
Topic: User Account System: HTTP Error 500 (Internal Server Error)
Replies: 14
Views: 2150

Re: User Account System: HTTP Error 500 (Internal Server Err

The SQL highlighting makes it sort of hard to read but I'll try... First, you want to remove connection details from your first code block. In your second code block, all those apostrophes in your sql statements around column names and table names from your database are going to cause errors. Change...
by ExtremeGaming
Thu Mar 14, 2013 7:31 pm
Forum: PHP
Topic: Foreach add to array
Replies: 1
Views: 509

Re: Foreach add to array

Shouldn't be too hard, try this with array_slice , array_push , and array_merge [syntax=php]<?php $first_array = array_slice($your_array, 0, 6); // 6 or 7 I forget which one it will take $second_array = array_slice($your_array, 7); $first_array = array_push($first_array, $new_value); $second_array =...
by ExtremeGaming
Fri Mar 08, 2013 2:25 am
Forum: JavaScript
Topic: Autoscroll
Replies: 1
Views: 1273

Autoscroll

I'm making a JQuery chat for my site and I'm having a hard time trying to figure out how to autoscroll the chat to the bottom for both the posting user, and any viewing users, each time a message is posted. I understand that I could set an interval to automatically scroll to the bottom every so ofte...
by ExtremeGaming
Wed Mar 06, 2013 2:38 pm
Forum: PHP
Topic: Status posting error
Replies: 3
Views: 855

Re: Status posting error

[syntax=php]mysql_query("INSERT INTO `feeds` (`id`, `username`, `time`, `status`) VALUES (`{$id}`, `{$user}`, `{$time}`, `{$status}`)");[/syntax]

You're using backticks in your VALUES clause. Change those to apostrophes