Search found 19 matches

by Skiddles2010
Thu Jul 22, 2010 10:32 am
Forum: PHP - Code
Topic: Need help building an associative array
Replies: 4
Views: 204

Re: Need help building an associative array

Ahh, perfect! Seems like there's a shortcut function for everything I want to do in PHP... haha.
by Skiddles2010
Thu Jul 22, 2010 9:07 am
Forum: PHP - Code
Topic: Need help building an associative array
Replies: 4
Views: 204

Re: Need help building an associative array

I have a fairly dynamic form that prompts the user to provide input for certain fields via showing and hiding divs. Upon hitting submit, ALL the variable are $_POST'd, including the blank form variables in the hidden divs. In the form processing file, I'm trying to build a new associative array base...
by Skiddles2010
Thu Jul 22, 2010 7:37 am
Forum: PHP - Code
Topic: Need help building an associative array
Replies: 4
Views: 204

Need help building an associative array

Can anyone tell me why the following code print_r 's to something like: Array ( [0] => 'MAX_FILE_SIZE'=>'1000000', 'actual_type'=>'Map', 'obj_name'=>'teagfsagsd', 'map_region'=>'gasdfadsf', 'map_type'=>'Dungeon', 'map_connections'=>'wgrgawg' ) Instead of something like: Array ('MAX_FILE_SIZE'=>'1000...
by Skiddles2010
Tue Jul 20, 2010 7:39 pm
Forum: PHP - Security
Topic: Securing from textarea input
Replies: 1
Views: 1085

Securing from textarea input

I could use some help wrapping my head around this. I'd like to know what's a good way to go about securing multi-paragraph textarea inputs? The user will be inputting some kind of "How-To" guide of their own, so I need to allow things like periods, semicolons, apostrophe's, question marks...
by Skiddles2010
Mon Jul 19, 2010 10:22 pm
Forum: Databases
Topic: Search Entire Database
Replies: 1
Views: 529

Search Entire Database

Let's say I have a database with 12 tables. Each of these tables contains a "name" column and a "url" column. I want the user to be able to search a word or phrase, and pull information from the tables based on the search. Currently, the way I'm doing it is... the user submits hi...
by Skiddles2010
Thu Jul 15, 2010 7:29 am
Forum: PHP - Code
Topic: Unknown Column in Field List
Replies: 4
Views: 205

Re: Unknown Column in Field List

Nice one Weirdan.
by Skiddles2010
Wed Jul 14, 2010 7:32 am
Forum: Databases
Topic: Database Optimization Questions
Replies: 3
Views: 836

Re: Database Optimization Questions

Think of it this way... You have a HUGE book containing blank sheets of paper. Lets say there are over a million blank sheets of paper. The whole piece of paper is the MAX allowable data for each user. If you assign each user an entire page and the user only posts two letters on that page then the ...
by Skiddles2010
Tue Jul 13, 2010 10:41 am
Forum: PHP - Code
Topic: Unknown Column in Field List
Replies: 4
Views: 205

Re: Unknown Column in Field List

Ahh, thanks. Works.
by Skiddles2010
Tue Jul 13, 2010 10:28 am
Forum: PHP - Code
Topic: Unknown Column in Field List
Replies: 4
Views: 205

Unknown Column in Field List

The error: Unknown column 'item' in 'field list' The relevant code: $result = mysql_query("SELECT $add_type " . "_name FROM t_" . "$add_type WHERE $obj_name = $add_type" . "_name") or die(mysql_error()); Basically I'm trying to append " _name " to th...
by Skiddles2010
Mon Jul 12, 2010 11:48 pm
Forum: Databases
Topic: Database Optimization Questions
Replies: 3
Views: 836

Database Optimization Questions

I run a forum community that on average has about 40 people online per 15 minute window at any given time. We usually peak around 70~80 users online in the same window. I'm not sure if that information is relevant to my concern but I thought it should be mentioned. The problem: max number of mysql c...
by Skiddles2010
Fri Jul 09, 2010 9:30 am
Forum: PHP - Code
Topic: Sessions...
Replies: 3
Views: 120

Re: Sessions...

Use session_start(); at the top of both pages to tell PHP that you're utilizing sessions, otherwise you're just throwing that variable into the abyss, never to be heard from again. After starting the session you can then start throwing variables like user into it and also validate that $_SESSION['us...
by Skiddles2010
Fri Jul 09, 2010 9:25 am
Forum: PHP - Code
Topic: string problem
Replies: 6
Views: 482

Re: string problem

Is there a particular reason behind not modifying run.php?
by Skiddles2010
Thu Jul 08, 2010 10:46 am
Forum: PHP - Code
Topic: Problem with IF statement?
Replies: 4
Views: 150

Re: Problem with IF statement?

I don't have anything to test this on here at work... but did you try putting the if statement directly after obtaining mysql_num_rows()? Seems like the most logical solution to me. $rows = mysql_num_rows($result); If ($rows != 0) // do all this stuff... $limit = 3; $last = ceil($rows/$limit); if ($...
by Skiddles2010
Thu Jul 08, 2010 10:15 am
Forum: PHP - Code
Topic: problem with login
Replies: 8
Views: 251

Re: problem with login

i also have a problem with photo upload in an add. it doesn't upload them. "problem in creating image"\ could u please give me a PM with ur yahoo id to chat more easily? Well, I can't because I'm at work. Plus I don't know a whole lot about scripting image uploads. But I'm sure if you pos...
by Skiddles2010
Thu Jul 08, 2010 9:59 am
Forum: PHP - Code
Topic: problem with login
Replies: 8
Views: 251

Re: problem with login

Change this...

Code: Select all

$user=$_POST['admin'];
$parola=$_POST['password']; 
to this...

Code: Select all

$user=$_POST['user'];
$parola=$_POST['parola']; 
and you should be fine. Notice the input names you have chosen in your form need to match up with the $_POST definitions in your checklogin.php.