Killer_Typo 82 Master Poster

Ok, right now i have an array that the user enters into a form and when they submit it, it is loaded into a PHP script that i have set into an iFrame so that you can modify the mysql database in real time (sorta)

but heres my problem. i want the user to type in somthing, and when they submit it, be displayed with color syntaxing in the iFrame before execution.

Right now im using the function break to seperate the array at all the spaces, but now i need to compare those seperations to an array which contains the syntaxing information.


here is the users array they might type in.

REMOVE FROM *.* WHERE ....etc //this is the liv_mysql_data field

is saved like this

$post = $_POST[live_mysql_data]

it will be broken up by the array like this

then using this function.

$broken = break (" ", $post)
the array is broken at all the spaces.

but now i need to take the $broken and compare it to

this array

array ("REMOVE" => "location of some style sheet for formatting", "FROM" => "location of some style sheet for formatting", .....etc)

and have it output like this


echo "<div id="location of the style sheet that matches the $broken term">$broken</div>";


i hope im not being to vague, or im not missing somthing to obvious. ive been working on this …

Killer_Typo 82 Master Poster

ahh your so right, but this was the alpha install of PHP5, he gave no instructions on how to install the alpha version. he gave the generic instructions for PHP4.

Killer_Typo 82 Master Poster

lint --> carpet

Killer_Typo 82 Master Poster

ring --> bellybutton

Killer_Typo 82 Master Poster

redownload IE from windows.com and redownload WMP from windows.com reinstall and see if they work.

Killer_Typo 82 Master Poster

;lakjsd;lfkjasl;djfla;shgpoasihgal;skd a

that was one funny and great story.

Killer_Typo 82 Master Poster

another good idea, (one i got from my dad) is start by building a simpler version. a version that doesnt do all of it, but only part of it, and expand upon that. work with something simple. like instead of ten input fields for somthing or other only 1. you know things like that. then build off of that into somthing bigger.

Killer_Typo 82 Master Poster

PHP 5
fast&easy
web development
By: Julie Meloni

So far this has been one of the better books that i have read. it has alot of examples and has actually inspired me to write some of my own unique code. Though the book has some faults in the Code, it makes up for this by the layout of the code and the commenting of all the lines of code so that the user knows exactly the what and the how. It does lack in the section however, of the how to correctly install and run PHP5. still though a good book and recomended read for everyone.

Killer_Typo 82 Master Poster

Intro

OK, there's going to be a lot here, but it's just something that I built as my own crapped down version of PHPmyAdmin. I know it's not great. but that's not the point ;)

Getting started

db_management:

<html>
<body>
	<table border="0" width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td align="left" valign="top">
<?php $host = "localhost"; //Location of Mysql
$name = "michael"; //User Name for Mysql
$pass = ""; //Password for Mysql 
	$connect = mysql_connect ($host, $name, $pass)
				or die (mysql_error());
	$database = mysql_list_dbs ($connect)
				or die (mysql_error()); 	$database_list = "<ul>"; 	$db_value = 0; 	while ($db_value < mysql_num_rows ($database))
		 {
		 $database_names[$db_value] = mysql_tablename ($database, $db_value);
		 $database_list .= "<li>$database_names[$db_value]";
			 $tables = mysql_list_tables ($database_names[$db_value]) or die (mysql_error());
			 $tb_list = "<ul>";
			 $tb_value = 0;
				 while ($tb_value < mysql_num_rows($tables))
					 {
						$table_names[$tb_value] = mysql_tablename ($tables, $tb_value);
						$tb_list .= "<li>$table_names[$tb_value]";
						$tb_value++;
					 }
		 $tb_list .= "</ul><br />";
		 $database_list .= "$tb_list";
		 $db_value++;
		 }
 
	$database_list .= "</ul>";
	echo "<b>Database Management</b>";
	echo "$database_list"; ?> 		</td>
		<td algin="left" valign="top">
	<strong>
		Please type the name of the database you wish to modify!
	</strong>
	<form method="post" action="db_modify.php"> 	<input type="text" name="DBname" id="DBname"><i> ---enter database name as seen</i>
	<br />
	<input type="submit" name="submit" id="sumbit" value="Modify Database"> 	</form>
	<br />
	<br />
	<strong>
		Please type the name of the database you wish to Create!
	</strong>
	<form method="post" action="db_create.php"> 	<input type="text" name="DBname" id="DBname">
	<br />
	<input type="submit" name="submit" id="sumbit" value="Create Database"> 	</form>
		</td>
</body>
</html>

Modifying the databases

db_modify:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Modify Database</title>
</head>
 
<body>
	<table border="1" width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td …
Killer_Typo 82 Master Poster

ok so this is what i have so far, its a simpler version of what i have stated before and is just a test to figure out how to break apart arrays.

<?php
//building the array to check the output against
$check_arr = array(" ", "this", "is", "nothing", "more", "than", "an", "array");
$check_break = explode(" ", $check_arr) or die(mysql_error());
$check_num = 1;
for($check_num >=1; $check_num <= 500; $check_num++)
 
//first we build the string that will be tested into the array
$array = " this is nothing more than an array";
//echo the array out to make sure that it is being displayed correctly
echo "$array <br />";
echo "now saving string to an array<br />";
//turning the string of text into an array
array ($array);
 
//breaking the array appart so that each piece can be read individually
$break = explode(" ", $array) or die(mysql_error());
$num = 1;
//displays each part of the array as long as array is shorter than 500 words.
	for($num >= 0; $num <= 500; $num++)
		{
		echo $break[$num] . "<br />";
		}
?>

(im not sure though do i even need to add the line array($array) or will it work without it....well nvm i can just go check.... nope dont need that line so just ignore it.)


but i now need to know how to check the second array's break with the first arrays break so it knows when to do the color coding information.

the output will be somthing like

Killer_Typo 82 Master Poster

naww its ok, i was having a sad day and shouldnt have dragged it onto the forums. well whats done is done, and lets put this all behind us :).

Killer_Typo 82 Master Poster

heh heh......

Perhaps you could have used a self-portrait. You forgot to include the next challenge, for whoever wants to follow you!

Let's try:

"geriatric teeny-bopper"

so i forgot, doesnt give you the right to be a jerk and refer to me as a dumbass.

Killer_Typo 82 Master Poster

well...hopefully this wont take tooo many years ;)

Killer_Typo 82 Master Poster

ugh that is a horrible picture for the last zulu warrior. cmon be more imaginative.

i did a little research and came up with this.

http://www.thebestpageintheuniverse.net/images/last_african.jpg

but for your dumb ass. i got this.

[IMG]http://www.valleyskeptic.com/bush_mouth.jpg[/IMG]

Killer_Typo 82 Master Poster
Killer_Typo 82 Master Poster

hahahahhahahahah yeah. that can be a real pain the butt. my favorite errors are ones that want you to send into microsoft in an error report.

like my dad was working on program one day, and was running Mac's iTune in the background for some testing, and it of course crashed (being that it was mac software) my dad got the would you like to send an error report, he of course did because he thought it would be funny to see the faces of the microsoft tech employees reading a macintosh program crash report. i got a good chuckle out of it.

Killer_Typo 82 Master Poster

does anyone know where i can find a complete list of mysql commands. Im in the proccess of writing a live mysql database interaction for web use. and right now i need to store all mysql commands to an array and have the php script read the array and modify the words as it sees them.

so if i typed in

UPDATE TABLE.....

the script would read up until the first white space. take the string of characters that it had been reading up to that point, check it against the array, and if it found it. it would read the number associated with the array value and then check that number against another array where the number would contain formatting options.


i need it to do this. because when you enter the mysql_query it prints it out and says, you are about to run this query :(query here) and i want to have clean formatting of the text.

Killer_Typo 82 Master Poster

somthing so indescribable

Killer_Typo 82 Master Poster

i honestly dont remember what i did now. but since php5 is now out of alpha and up for release it should be good to install now.

Killer_Typo 82 Master Poster

lol thats what happend. the instructions given were only half right. they didnt tell you to rebuild the file structure or what files to move. just that some of the .dll's needed to be moved.

Killer_Typo 82 Master Poster

did you make sure that IDE 1 is master. IDE 2 is Slave and on same cable. then put 2 CDRom devices on seperate cable...

Killer_Typo 82 Master Poster

dont forget to md5sum the packages after download to make sure that they are all good downloads or you may end up wasint money on blank cd's only to find out that file you downloaded was bad.

Killer_Typo 82 Master Poster

on his chicken

Killer_Typo 82 Master Poster

Yeah, it's the final release. Ah, I remember. You had trouble connecting to MySQL, right?

yup but i was able to fix after moving the right dll's into my system32 folder. it was a matter of a old file being loaded before the new one.

Killer_Typo 82 Master Poster

i know the dual monitors is possible. But you can only use it to do a super wide monitor, or use it as copy (IE it shows the same on both monitors), i dont think you can use seperate keyboards for each monitor.

Killer_Typo 82 Master Poster

so its no longer in the alpha stages?? if so thats good to hear, i had quite the time figuring it out, though i eventually got it to work.

Killer_Typo 82 Master Poster

Ouch.... how did she pull that off?

there are a few tools out there that will do it for you (maxtor has one that comes with its ghosting software when you purchase one of their HDD's)

Killer_Typo 82 Master Poster

No one actually really knows what the AGP aperture size is for. My dad used to write device drivers for video/sound card and says that most all drivers are written to ignore it, and it doesnt matter what size you set it to. as to your sdram frequency. i dont know because i dont often mess with that sort of thing. but im guessing its set to be as fast as the comp can handle???

Killer_Typo 82 Master Poster

What is the best / fastest way to format a hard drive that currently has windows 98 on it?

I currently don;t have any computers avail w/ xp to put the hd into.

-Ron J

take the computer into the backyard, grab a shotgun, and shoot it right behind the harddrive, poor old comp wont feel a thing....j/k

Killer_Typo 82 Master Poster

i just use google toolbar. i hate popups and theres no reason to save them to a new window because all popups are junk. If i need to click on a link i know to hold ctrl down so that i can bypass the blocker.

Killer_Typo 82 Master Poster

and fat kids

Killer_Typo 82 Master Poster

ummm...that sounds a little dangerous...hey lets swap my nice P4 with someones crappy P2?? why and who would do that?

Killer_Typo 82 Master Poster

what are the major differences between unix and linux?

Killer_Typo 82 Master Poster

ok, i have a great story for you guys. For awhile i was running a Guilemont video card. The maxi Gamer Cougar to be exact. After awhile of use it just stoped working and i would get a black screen nothing more nothing less. i could hear the machine boot, but it still wouldnt show anything. After further inspection into my computer i realized that the heat sink had fallen off and so the card was basicly useless. I thought i had done a thorough search of the pc but still couldnt find the missing heat sink. Well i replaced the card and while replacing it, i found the heat sink, firmly stuck to the inside wall of the case. Wierd eh!

Killer_Typo 82 Master Poster

the site i went to for that info either stated what you need to replace, or action in which to fix, and i think he just needs to replace the system board because there was no sequence for a fix.

Killer_Typo 82 Master Poster

Error code
0175

Symptom
Bad CRC1, stop POST task, the EEPROM checksum is not correct.

FRU or action, in sequence
System board.

im not sure what you can do about it though, it sounds like your Mobo is going/gone bad.

Killer_Typo 82 Master Poster

and sucking down

Killer_Typo 82 Master Poster

they rubbed together

Killer_Typo 82 Master Poster

most bizarre comp problem....cant say i have found one because computers seem to be able to supprize me every day.

Killer_Typo 82 Master Poster

pazaak --> huh?

Killer_Typo 82 Master Poster

grab your ankles

Killer_Typo 82 Master Poster

this site uses VBbulletin board, which will run you about 160 cash. PHPforums are free and relativly nice for free. They each have a set of instructions for install, just do a google on them.

Killer_Typo 82 Master Poster

wow we got alot of crazy desktops to show now dont we!

Killer_Typo 82 Master Poster

im a tables man myself, i feel i can design just as good with them as i can with div's, but i dont do div's that much so i dunno. i think ill give div's a go and make a better educated desicion later. OFF TO CODE SOME MORE!!!!

Killer_Typo 82 Master Poster

www.w3schools.org is the site i believe. its got alot of good stuff there. or you can go down to your local library and check out some scripting books.

Killer_Typo 82 Master Poster

and putting mashedpotatoes

Killer_Typo 82 Master Poster

ok. heres my desktop(s) i run a dual monitor setup so its a huge picture.

Killer_Typo 82 Master Poster

dont have time to fully go through it. but i can say right now. Fix all 01 entries they are always bad.

Killer_Typo 82 Master Poster

1) I think you should check your partitions and make sure you've got them setup properly. Perhaps try another filesystem than you're already using?

2) This sounds stupid, but are you positive your HDD works fine? Have you recently had other operating systems on it?

3) This is slightly stupid as well - are you sure your CD drive doesn't have any issues? I've had problems before where my CD drive would work fine in short burst situations like moving files in Windows, but when installing an OS it would just die right then and there.

1. partitions should be fine. i just had linux redhat fedora core on it

2. same as above.

3. wouldnt be suprized cd drive sucks.

Killer_Typo 82 Master Poster

ill get to that tonight, the machines giving me alot of problems and i think it has to do alot with the misstreatment of the machine (never got proper attention)