Search found 18 matches

by mogman42
Tue Jul 20, 2004 12:58 pm
Forum: PHP - Code
Topic: [SOLVED] Bad query or error: Column count doesn't match valu
Replies: 4
Views: 387

Solved!!

solved - had the form type set to submit instead of post :cry:
by mogman42
Tue Jul 20, 2004 11:17 am
Forum: PHP - Code
Topic: [SOLVED] Bad query or error: Column count doesn't match valu
Replies: 4
Views: 387

the reason for the id inclusion was this page that I read.... http://htmlfixit.com/cgi-tutes/tutorial_MySQL_Error_Invalid_Query_Column_Count_Does_Not_Match_Value_Count.php Here is what I have right now, and its still generating the error. <?php // Insert form data into DB mysql_query("INSERT IN...
by mogman42
Tue Jul 20, 2004 10:49 am
Forum: PHP - Code
Topic: [SOLVED] Bad query or error: Column count doesn't match valu
Replies: 4
Views: 387

[SOLVED] Bad query or error: Column count doesn't match valu

Ok, I'm using this same basic code syntax with a different database/page and it works fine. I created a new db/table, ec. for this page data to submit and it gives me this error whenever I try to submit the form. Bad query or error: Column count doesn't match value count at row 1 <?php // Begin subm...
by mogman42
Fri Jun 18, 2004 10:08 am
Forum: PHP - Code
Topic: PHP and mySQL search functions...
Replies: 11
Views: 1139

Hmm, thanks for the idea.........tried the following code. It runs, dumps me to the results page, but only displays the headers. No errors, no data..........nada. here is the page code in its entirety <?php <html> <head> <title>Search Submit</title> </head> <body> <? // IP Restriction Code $ip = joi...
by mogman42
Fri Jun 18, 2004 9:48 am
Forum: PHP - Code
Topic: PHP and mySQL search functions...
Replies: 11
Views: 1139

yup, I figured it out! thanks! New question tho.......... Why won't this display any data? <?php $sql=mysql_query("SELECT * FROM data WHERE (rccfname LIKE '%namesearch%') OR (rcclname LIKE '%namesearch%') OR (clientfname LIKE '%namesearch%') OR (clientlname LIKE '%namesearch%')", $link) or...
by mogman42
Fri Jun 18, 2004 7:59 am
Forum: PHP - Code
Topic: PHP and mySQL search functions...
Replies: 11
Views: 1139

After you carefully read feyd's post again, this would be a good place to start: http://dev.mysql.com/doc/mysql/en/index.html SELECT bldg FROM data where bldg = '$areasearch'" Is the same as saying in English: I want to know the value of the field ' bldg ' in the table 'data' where the value o...
by mogman42
Fri Jun 18, 2004 1:22 am
Forum: PHP - Code
Topic: PHP and mySQL search functions...
Replies: 11
Views: 1139

feyd - for my query I want it to check the following table and search one specific column for a certain piece of data, then return and print out all the rows that have that data in the column. user enters a value in the search field - say a building name. I want to search a specific column in the ta...
by mogman42
Thu Jun 17, 2004 3:42 pm
Forum: PHP - Code
Topic: PHP and mySQL search functions...
Replies: 11
Views: 1139

PHP and mySQL search functions...

New problem.... Why won't this code work? $sql=mysql_query("SELECT * FROM data WHERE (rccfname LIKE '%namesearch%') OR (rcclname LIKE '%namesearch%') OR (clientfname LIKE '%namesearch%') OR (clientlname LIKE '%namesearch%')", $link) or die(mysql_error()); Solution Code to Below <?php $sql=...
by mogman42
Wed Jun 02, 2004 12:22 pm
Forum: PHP - Code
Topic: Restrict webpage access via IP?
Replies: 9
Views: 880

You could do: $ip = join('.', array_slice(explode('.', $_SERVER['REMOTE_ADDR']), 0, 2)); if($ip != '132.177'){ die('whatever'); } Bingo!!! That was it!! Thank you SOOOO much!! Also, for reference I found this article on PHP Authentication... http://www.informit.com/articles/article.asp?p=31690&...
by mogman42
Wed Jun 02, 2004 12:11 pm
Forum: PHP - Code
Topic: Restrict webpage access via IP?
Replies: 9
Views: 880

Tried this..........page just loads, even when the criteria isn't met... <?php //Check for local network users $ip = $_SERVER&#1111;'REMOTE_ADDR']; $check != strstr('132.177', $ip); If($ip != '132.177') &#123; die('You are not authorized to view this page!'); &#125; //Load page normally ...
by mogman42
Wed Jun 02, 2004 11:13 am
Forum: PHP - Code
Topic: Restrict webpage access via IP?
Replies: 9
Views: 880

Doh, so it is..........thank you :P

K, another question....

How do I specify to only check the first two sets of #'s from the $_SERVER['REMOTE_ADDR'] variable?

I only want it to check for 132.177.xxx.xxx the last two don't matter.
by mogman42
Wed Jun 02, 2004 10:46 am
Forum: PHP - Code
Topic: Restrict webpage access via IP?
Replies: 9
Views: 880

Thanks very much for the code help! However, I get this... Parse error: parse error, unexpected '{' in D:\web\beta\search.html on line 13 I've tried moving it around, etc. Refuses to work. 10: <?php 11: $ip = $_SERVER&#1111;'REMOTE_ADDR']; 12: If(!strstr('132.177', $ip) 13: &#123; 14: die('Y...
by mogman42
Wed Jun 02, 2004 9:07 am
Forum: PHP - Code
Topic: Restrict webpage access via IP?
Replies: 9
Views: 880

Restrict webpage access via IP?

Ok, I'm trying to restrict webpage access for some internal pages to local network users only via IP address using REMOTE_ADDR. Looking at the code below, am I going about it in the right way? Thanks! <? $ip = $_SERVER&#1111;'REMOTE_ADDR']; If($ip != 132.177) &#123; echo 'You are not granted...
by mogman42
Fri May 21, 2004 12:58 pm
Forum: PHP - Code
Topic: PHP error?
Replies: 9
Views: 718

Bingo....thanks very much...!!!! :D Guess I just needed to slow down and pay attention to the details....didn't think about what each line actually did, just cross checked it against other config/setup options in the documentation. Now for mySQL connectivity........but I'll slog thru that on my own :P
by mogman42
Fri May 21, 2004 12:31 pm
Forum: PHP - Code
Topic: PHP error?
Replies: 9
Views: 718

I thought thats what these lines were for in httpd.conf ?

Addtype application/x-httpd-php .php .phtml
AddType text/html .php
AddType application/x-httpd-php-source .phps

AddHandler php-script php


????