mike-db.com

Computer builds, hardware and software discussion or troubleshooting, including peripherals. Essentially a general place to talk about desktop computers.
Locked
User avatar
MikeDB
Posts: 1224
Joined: Fri May 13, 2005 3:09 pm

mike-db.com

Post 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
User avatar
MikeDB
Posts: 1224
Joined: Fri May 13, 2005 3:09 pm

mike-db.com

Post 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
User avatar
MikeDB
Posts: 1224
Joined: Fri May 13, 2005 3:09 pm

mike-db.com

Post 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
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

mike-db.com

Post 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
Honk if you love Jesus, text if you want to meet Him!
User avatar
MikeDB
Posts: 1224
Joined: Fri May 13, 2005 3:09 pm

mike-db.com

Post by MikeDB »

ahhh, ok I think I get it.

Archived topic from Iceteks, old topic ID:4196, old post ID:34151
User avatar
MikeDB
Posts: 1224
Joined: Fri May 13, 2005 3:09 pm

mike-db.com

Post 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
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

mike-db.com

Post 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
Honk if you love Jesus, text if you want to meet Him!
User avatar
MikeDB
Posts: 1224
Joined: Fri May 13, 2005 3:09 pm

mike-db.com

Post by MikeDB »

huh?

Archived topic from Iceteks, old topic ID:4196, old post ID:34189
User avatar
MikeDB
Posts: 1224
Joined: Fri May 13, 2005 3:09 pm

mike-db.com

Post by MikeDB »

HA red it works www.mike-db.om/guestbook.html

Archived topic from Iceteks, old topic ID:4196, old post ID:34212
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

mike-db.com

Post by Red Squirrel »

cool glad to know you got it working.

Archived topic from Iceteks, old topic ID:4196, old post ID:34213
Honk if you love Jesus, text if you want to meet Him!
User avatar
MikeDB
Posts: 1224
Joined: Fri May 13, 2005 3:09 pm

mike-db.com

Post by MikeDB »

I did'nt really think it would work :P

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