DanceInstructor 19 Posting Whiz

You could try GIMP. It is free.

Dance

DanceInstructor 19 Posting Whiz

Bah. I had typed Student ID instead of StudentID, don't know if you caught that or not. Anyways try the options below, or have you already got it working?

$query = "SELECT StudentID FROM mmstudents where StudentsEmailAddress = '{$_POST['EmailAddress']}' and StudentPassword = '{$_POST['Password']}'";

or:

$query = "SELECT StudentID FROM mmstudents where StudentsEmailAddress = " . "'" . "{$_POST['EmailAddress']}" . "'" . " and StudentPassword = " . "'" . "{$_POST['Password']}" . "'";

Dance

DanceInstructor 19 Posting Whiz

I haven't used these but that is the way I read it, only differences in output. The command part is a string so I assume you can use variables normally in the command.

Dance

DanceInstructor 19 Posting Whiz

You could also try Simple PHP Gallery. I use it on my site. It is fast (uses caching), and auto generates thumbnails. No integration with vbulletin or phpBB, but can integrate with Wordpress if I am not mistaken.

Dance

DanceInstructor 19 Posting Whiz
$query = "SELECT Student ID FROM mmstudents where StudentsEmailAddress = {$_POST['EmailAddress']} and StudentPassword = {$_POST['Password']}";
$RSStudent_query=mysql_query($query,$db);
if (!$RSStudent_query) {
   $message  = 'Invalid query: ' . mysql_error() . "\n";
   $message .= 'Whole query: ' . $query;
   die($message);
}
$RSStudent=mysql_fetch_array($RSStudent_query);

Try that and see what it says...

Dance

DanceInstructor 19 Posting Whiz

I don't think that can work the way you want it to. Instead of trying to execute details.php in your script, include it and call functions from it. Now your code would probably better formed like this:

$result = mysql_query("SELECT * FROM customers WHERE username='$user'and password='$pass'",$db);

$myrow = mysql_fetch_array($results));

if($myrow)
{
  foreach($myrow as $key => $row)
  {
    do something with $row or do something with $myrow[$key]
  }
}
else
{
   echo "Sorry, Incorrect Username or Password!";
}

Hope this helps,
Dance

DanceInstructor 19 Posting Whiz

The simplest way is to have php write the info you want into the page as javascript, for ex:

<script type="text/javascript" language="javascript">
<!--
<?php 
echo("firstVar = $var1;");
echo("2ndVar = $var2;");
?>
// -->
</script>
Dukane commented: cool solution +2
DanceInstructor 19 Posting Whiz
$query = "SELECT Student ID FROM mmstudents where StudentsEmailAddress = {$_POST['EmailAddress']} and StudentPassword = {$_POST['Password']}";
$RSStudent_query=mysql_query($query,$db);
$RSStudent=mysql_fetch_array($RSStudent_query);

Try that instead. Hopefully I have no typos...

Dance

DanceInstructor 19 Posting Whiz

Maybe you could add a news box somewhere near the top of your page with a link back to a forum topic for viewer input, doesn't have to be big, or bulky. Every so often post something new in it that might spark discussion, maybe even something a lil' inaccurate or slightly controversial. At any rate something to grab their attention and get them thinking....

Dance

DanceInstructor 19 Posting Whiz

Try removing the @s from all mysql_ commands. This will allow you to see any mysql or php erros.

Dance

DanceInstructor 19 Posting Whiz

This should work for you:

<?php
// Edit these...
$page_to_cache = "http://www.theirdomain.com/pagetocache.html";
$page_to_write = 'mycachedpage.html';

// Do not edit below...
$cache = file_get_contents($page_to_cache);

$fh = fopen($page_to_write, 'wt');
fwrite($fh, $cache);
fclose($fh);

?>

You can contact your host to setup a cron job, or possibly do it in the cpanel.

Dance

DanceInstructor 19 Posting Whiz

You can get phpMyAdmin here: http://www.phpmyadmin.net/home_page/index.php

Dance

DanceInstructor 19 Posting Whiz

Don't call:

mysql_close($dbh);

until you have performed your querys.

Dance

DanceInstructor 19 Posting Whiz

Contact your host to set up a cron job or if you have the option in your cpanel set it up yourself (for a linux server). If you have a windows based server you will need to use task scheduler.

Dance

DanceInstructor 19 Posting Whiz

I'm not sure what to do at this point. Have you had a look at the IIs error logs to see if there is more information there?

If nothing else then I guess yes uninstall php completely and reinstall. Php 4 or 5 should work fine with mysql....

Dance

DanceInstructor 19 Posting Whiz

Not really the solution you are looking for, but you could use a php script to cache the pages locally on your server. What are you trying to do exactly. I would be very careful using content from someone elses sight in this way....

Dance

DanceInstructor 19 Posting Whiz

One thing I see, this:

if (ereg("^([a-z]+)|[0-9]{2,2})$", $keyword[$i++]))
        $validKeyWord= false

should probably be:

if (ereg("^([a-z]+)|[0-9]{2,2})$", $keyword[$i++]))
     {
        $validKeyWord= false;
     }

Dance

DanceInstructor 19 Posting Whiz

Is libmysql.dll in your c:\windows directory?

Note: Windows users will need to enable php_mysql.dll inside of php.ini and either copy libmysql.dll into the Windows system directory, or make it available to the PATH. from: http://us4.php.net/mysql

DanceInstructor 19 Posting Whiz

I think you should listen to DaveSW :p Don't get too caught up on an ideal or concept, this has caused me many problems in the past....

My biggest problems with CSS arise when I get caught up in how I think it should work, instead of trying to find out how it actually works lol.

Dance

DanceInstructor 19 Posting Whiz

For php5, did you use the msi installer or download the zip file for installation?

Dance

DanceInstructor 19 Posting Whiz

If you placed the database backup on the server via ftp, then I suggest you check the permissions, assuming you have a linux based server. If you are trying to upload the file using vbulletin, then you may need to split the file up into smaller chunks as many servers limit the size of files you can upload.

Dance

DanceInstructor 19 Posting Whiz

Hmm looks like your permissions are wrong. You will need to use chmod to give the webserver access to the files in your script. Chmod 755 will probably be good, if that doesn't work go 777. If you use a ftp program you could try right-clicking on the file on the server and choose properties, this should give you access to change the files permissions. For more info google: chmod tutorial. There are lots of tutorials.

Dance

DanceInstructor 19 Posting Whiz

Hopefully the host that charges more is providing a much better server and really high bandwidth...... As Gary noted mysql is open source and free to use.

My suggestion is to rent a dedicated server and load what you want on it :)

Dance

DanceInstructor 19 Posting Whiz

What version of mysql?? If it is new and php is not new, you might try starting the mysql server with the option --old-passwords. If you use mysqladministrator (gui) you can choose the old passwords option under the security tab.

You can read about it in detail here:

A.2.3. Client does not support authentication protocol

Dance

DanceInstructor 19 Posting Whiz

Yeah I just posted the example, didn't try to make it work for your situation, please excuse my laziness :mrgreen:

On a ranting note: I see the need for javascript, but HATE how PICKY it is.......

Dance

DanceInstructor 19 Posting Whiz

Found this example of an html form. Hope it helps.

<form action="handle_event.php" method="post">
<p> Event name: <input type="text" name="name" size="30" /></p>

<p>Week Days:
<input type="checkbox" name="weekdays[]" value="Sunday" />S
<input type="checkbox" name="weekdays[]" value="Monday" />M
<input type="checkbox" name="weekdays[]" value="Tuesday" />T
<input type="checkbox" name="weekdays[]" value="Wednesday" />W
<input type="checkbox" name="weekdays[]" value="Thursday" />T
<input type="checkbox" name="weekdays[]" value="Friday" />F
<input type="checkbox" name="weekdays[]" value="Saturday" />S
</p>

<input type="submit" name="submit" value="Add the Event!" />
</form>

It's from "PHP for the World Wide Web" by Larry Ullman http://www.dmcinsights.com/phpvqs2/

Dance

DanceInstructor 19 Posting Whiz
$catarray= $_POST['catlist'];

shouldn't need parenthesis.

Have you tried:

print_r($catarray);

I haven't pulled arrays from POST yet, so I'm not sure how it works. Here is a small script to output all the variables that are defined in php. You will be interested in the _POST section :)

$output = get_defined_vars();
$fh = fopen('output.txt', at);
foreach($output as $yek => $out)
{
      fwrite($fh, "*******************$yek****************************\r\n\r\n");
      foreach($out as $key => $o)
      {
            fwrite($fh, "$key\t\t\t\t");
            fwrite($fh, $o);
            fwrite($fh, "\r\n\r\n");
      }
}
fclose($fh);

That way you can be sure what the data looks like and if it is indeed being transeferred from the html form.

Dance

DanceInstructor 19 Posting Whiz

So... you realize you are trying to use 2 databases??

for command == "init" you have: mysql_select_db("kevinsmi_game")

for command == "update" you have mysql_select_db("game")

As far as the table:
db name: kevinsmi_game
table: game
field1: players
field2: scores
field3: distances
field4: victims

DanceInstructor 19 Posting Whiz

terminal :sad:

Dance

DanceInstructor 19 Posting Whiz

This would work for an apache server. Go to the apache/conf directory or wherever the apache httpd.conf file is, open it and add this to the file. This would forbid access to any php files in that directory. I'm sure there is another way to do it, but I don't know it :o

<Directory "/var/usr/username/">
	.....stuff.....
	AllowOverride None
	<Files "*.php">
    		Order allow,deny
    		Deny from all
	</Files>
</Directory>

If you have more questions reply here and I will try to help.

Dance

DanceInstructor 19 Posting Whiz
DanceInstructor 19 Posting Whiz

Actually the adds would still work, because each time the page is refreshed or hit, the clients browser would request the info from the ad server...

Just remove the login from the portal and their is no confusion. The users could login in the forum.

I spent all of 5 minutes writing the script, so if you don't use it then no big deal :cool:

My opinion tho is to look into the server-dns side of things. Tell your hosting company that you have problems with slow load times and that people sometimes get timeouts when trying to connect.

Dance

DanceInstructor 19 Posting Whiz

database

Dance

DanceInstructor 19 Posting Whiz

One hiccup of making the page static: the members would reach the page, they may see the login box and think they are not logged in, when in truth they would be logged in once they reached a dynamic page... So you might consider removing the login box to reduce confusion. The login part would still work, but they might login unneccessarily and complain that they can't stay logged in.

<?php
// Edit these...
$page_to_cache = 'http://mysite/myportalpage.php';
$page_to_write = 'indextest.html'

// Do not edit below...
$cache = file_get_contents($page_to_cache);

$fh = fopen($page_to_write, wb);
fwrite($fh, $cache);
fclose($fh);

?>

This worked fine for a testing forum I have on my pc, the file it produced was an html file. Hopefully it will work for you. If you have any problems I will try to help.

Dance

DanceInstructor 19 Posting Whiz

Yes I have done it for my site ;) Although my site is small and doesn't have much traffic yet, so really doesnt need it. The script would be pretty small to do your portal page I think. Then setup a cron job to run it every so often, could save the server some overhead. If you want I will help, just contact me at heathnail@hotmail.com

I tried to visit your site a couple minutes ago and got a timeout twice. I was then able to get the site up. I think you should look into the possibility of a problem with your host. I'm no expert tho so maybe someone else can chime in on that possibility....

Dance

DanceInstructor 19 Posting Whiz

I'm trying out this program. It has LOTS of features, very nice :D

Dance

DanceInstructor 19 Posting Whiz

The portal page loads pretty quickly for me, especially after the first time. So it seems to me the portal is not too slow. I suggest you start a poll on the forum to see what your members think....

If you really wanted to make sure it is fast, you could have a script write the output to a static html file every five minutes or so. ie: cache the page.

Dance

DanceInstructor 19 Posting Whiz

In the short time that I have been here (less than a week) I have seen your posts sooo many times. Seeing you here so much has helped to keep me coming back. Not only that but you are always friendly, informative, and encouraging more discussion. To me that is a very big draw.

The site itself is great. The forum has many features, bells, and whistles. It would seem to me that on the backend you could afford to move things at a slower pace. I'm sure that you have many things you would like to see done, but at this point I personally don't see adding features to the site to be crucial.

So in summary: Stay active here. You probably don't have to be as active as you think (we always think we should do more than we do right?) As others have noted, You are a big part of this site and what makes it successful.

xcuse me while I go whipe my nose :p ,
Dance

DanceInstructor 19 Posting Whiz

Howdy,

Just started lurking here on Tuesday. Hope to make some useful contributions to the community at some point :cheesy:

Dance