Page 1 of 1

mike-db.com

Posted: Wed Feb 22, 2006 3:28 pm
by MikeDB
cool stuff going down now my dad finnaly got me my own domain name mike-db.com the look that it has now is not going to be there for long its soon going to be a flash/php site.

Archived topic from Iceteks, old topic ID:4196, old post ID:34120

mike-db.com

Posted: Wed Feb 22, 2006 3:37 pm
by MikeDB
Oh red I also plan to put the Squirrelbbs on to my site.

Archived topic from Iceteks, old topic ID:4196, old post ID:34121

mike-db.com

Posted: Fri Feb 24, 2006 11:45 pm
by MikeDB
how can I put flash on my site? but insted of using HTML I want to use php what would be the code for that?

Archived topic from Iceteks, old topic ID:4196, old post ID:34143

mike-db.com

Posted: Sat Feb 25, 2006 3:17 am
by Red Squirrel
well php on its own does not display anything, php is what generates the html but does it server side. this forum's index.php is all php but if you look at the source it's html, because the code runs and generates the proper html.

When you do a flash animation and export it choose to export it to html and it generates the code for you.

Archived topic from Iceteks, old topic ID:4196, old post ID:34149

mike-db.com

Posted: Sat Feb 25, 2006 1:10 pm
by MikeDB
ahhh, ok I think I get it.

Archived topic from Iceteks, old topic ID:4196, old post ID:34151

mike-db.com

Posted: Tue Feb 28, 2006 4:15 pm
by MikeDB
Ok so I am working on a guestbook for my site, now the php im using for it does not work properly with my server can someone please help me make a older version of doing this?

here is the code...

<?php
$Submit = $_POST["Submit"];
$Name = $_POST["Name"];
$Comments = $_POST["Comments"];
$NumLow = $_REQUEST["NumLow"];
$NumHigh = $_REQUEST["NumHigh"];

$Name = ereg_replace("[^A-Za-z0-9 ]", "", $Name);
$Comments = ereg_replace("[^A-Za-z0-9 @.-/']", "", $Comments);
// Remove slashes.
$Name = stripslashes($Name);
$Comments = stripslashes($Comments);



if ($Submit == "Yes") {
$filename = "GuestBook.txt";
$fp = fopen( $filename,"r");
$OldData = fread($fp, 80000);
fclose( $fp );
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
$Input = "Name: <b>$Name</b>
Comments: <b>$Comments</b>
<font size="-1">Date: <i>$Today</i></font>

.:::.";
$New = "$Input$OldData";
$fp = fopen( $filename,"w");
if(!$fp) die("&GuestBook=cannot write $filename ......&");
fwrite($fp, $New, 800000);
fclose( $fp );
}

$filename = "GuestBook.txt";
$fp = fopen( $filename,"r");
$Data = fread($fp, 800000);
fclose( $fp );
$DataArray = split (".:::.", $Data);
$NumEntries = count($DataArray) - 1;

print "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh&GuestBook=";
for ($n = $NumLow; $n < $NumHigh; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "

<b>No More entries</b>";
exit;
}
}
?>


Archived topic from Iceteks, old topic ID:4196, old post ID:34185

mike-db.com

Posted: Tue Feb 28, 2006 4:37 pm
by Red Squirrel
Ewww a file database. I'd try to make it use mysql if I were you. May not be an issue now, but it will be later one when you expand. File DBs are not too scalable.

Archived topic from Iceteks, old topic ID:4196, old post ID:34187

mike-db.com

Posted: Tue Feb 28, 2006 4:51 pm
by MikeDB
huh?

Archived topic from Iceteks, old topic ID:4196, old post ID:34189

mike-db.com

Posted: Thu Mar 02, 2006 1:54 pm
by MikeDB
HA red it works www.mike-db.om/guestbook.html

Archived topic from Iceteks, old topic ID:4196, old post ID:34212

mike-db.com

Posted: Thu Mar 02, 2006 3:37 pm
by Red Squirrel
cool glad to know you got it working.

Archived topic from Iceteks, old topic ID:4196, old post ID:34213

mike-db.com

Posted: Thu Mar 02, 2006 6:14 pm
by MikeDB
I did'nt really think it would work :P

Archived topic from Iceteks, old topic ID:4196, old post ID:34214