<$BlogRSDUrl$>

Friday, March 26, 2004

JavaScript Stuff 

in input tag put
id="id"

in javascript
var foo=document.getElementById("id");
foo.value returns the value

alert, promt and connfirm are the three global functions
prompt("","");
confirm("");
alert("");

Other Stuff





oreilly.com -- Online Catalog: Dynamic HTML: The Definitive Reference 

oreilly.com -- Online Catalog: Dynamic HTML: The Definitive Reference

This is a great book for HTML, CSS, and JavaScript. It is recommended by Conan.

This is where I go to do stuff with my digital certificate I got for email. 

https://www.thawte.com/cgi/personal/contents.exe

Thursday, March 25, 2004

Here is the code I used to learn how to login with sessions 

Log_in_with_Sessions.txt

phpdevshed.support :: View topic - Warning: Cannot send session cookie 

Here is an error similar to what I was getting.

Warning: Cannot send session cookie -
headers already sent by
(output started at c:foxservwwwchatses.php: in
c:foxservwwwchatses.php on line 18)

Warning: Cannot send session cache limiter -
headers already sent
(output started at c:foxservwwwchatses.php: in
c:foxservwwwchatses.php on line 18


This is what I did to fix it.
You need to make sure the cookies/sessions are enabled and output_buffering= On in your php.ini file

Now it works with no errors

Wednesday, March 24, 2004

PHP: Using Register Globals 

PHP: Using Register Globals - Manual
You better be careful about using Register Globals. The way things are done in the PHP4 book, and the way Dr. Liddle has done things, he seems to have Register Globals set to on. In PHP 4.2 Register Globals is set to Off by default. I guess it is supposed to be a security isssue. Anyway, in order to get around it you need to use Sessions or a Cookies, or someting like that. It shows you a little about that on this page. I don't uderstand everything about it, but I'll figure it out later.

PHP Help Forums -> PHP 5.0.0b4 

PHP Help Forums -> PHP 5.0.0b4
Here is someone trying to fix the
MySQL extension,
please check PHP Configuration.
error I keep getting. They are telling you to check where files are, and put them elsewhere.

An Easy way to install apache, php, and mysql???? Foxserv? 

Foxserv, making PHP-Nuke work on Windows Systems
Yup, it is true. It works pretty well! I installed it on my laptop. phpmyadmin even works for me, which is nice. I still don't have it running on my home box. The only thing that I had to change was include directory. foxserv installs pear, but it doesn't tell it to include it. You have to edit the php.ini file in the windows directory to make it work. You just uncomment the line, and change the directory to where your pear directory is installed. In my case it was c:\foxserv\php\pear After I did that pear worked nicely. Figuring out all of this stuff takes time, but I am doing it.

Example PHP code and online MySQL database, a username and password protected site example. 

Example PHP code and online MySQL database (cut-and-paste examples). The example is a username and password protected site example.

I am trying this code to see if it will help me set up the register and login part of my myGospel site

Tuesday, March 23, 2004

My Car Doesn't Work 

Ok, my car quit working yesterday. Nice, huh. I tried to jump it several times yesterday. I was going to give Andrew and Edwin a ride home when it wouldn't start. After jumping the car, the car would die. I had Andrew help me try to jump it again tonight. We got the same result. Finally I went with Dave to go and look at it. We jumped it, and as soon as we took the jumper cables off the car died. I think it is the alternator. We will see. I wish I could get it to autozone to check it out. Hopefully I can get it fixed soon.

I am really struggling trying to figure out this audit assignment we are doing in M Com 642. I have spent time on it....but I am still at a loss for what to do. Hopefully a light turns on in class. I don't like not being on top of things.

HaloScan.com - Weblog Commenting and Trackback
add the ability for other's to comment you blog
At this site you, after signing up, you can add the ablility for peple to comment on your blogs. And it is free.

Monday, March 22, 2004

Here is how to use auto increment in mysql
MySQL Manual | 3.6.9 Using AUTO_INCREMENT

The AUTO_INCREMENT attribute can be used to generate a unique identity for new rows:

CREATE TABLE animals (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO animals (name) VALUES ("dog"),("cat"),("penguin"),
("lax"),("whale"),("ostrich");
SELECT * FROM animals;

Which returns:

+----+---------+
| id | name |
+----+---------+
| 1 | dog |
| 2 | cat |
| 3 | penguin |
| 4 | lax |
| 5 | whale |
| 6 | ostrich |


This is Amy's Dream Ring 


This is the website where it is found.

generic sql delete statment
DELETE FROM tablename [WHERE clause]

a sql select statement
select * from MyFirstTable;

another sql select statement
SELECT * from MyFirstTable WHERE FIELD_1=1;

a generic sql update statement
UPDATE tablename SET column=value, ... [WHERE clause]

a specific sql update statement
UPDATE MyFirstTable SET FIELD_1=2 WHERE FIELD_1=1;


Here I've shown you how to enter a DATE and TIME as a numeric value, without quotes. To enter the values as text, do it like this:

mysql> INSERT INTO MyFirstTable (FIELD_1, FIELD_2, FIELD_3, FIELD_4, FIELD_5)
-> VALUES (1, 'Hello', 'world!', '1999-12-31', '12:34:56');

Here is a simple sql insert statement
mysql> INSERT INTO MyFirstTable (FIELD_1, FIELD_2, FIELD_3, FIELD_4, FIELD_5)
-> VALUES (1, 'Hello', 'world!', 19991231, 123456)

Create a table in MySQL:
Here is some info about tables

OK, so what do you need to know about this statement? The name of the table, 'MyFirstTable' (color-coded in red), follows 'CREATE TABLE'. Parentheses enclose the entire field list, including column names and types. Each field, consisting of the column name and type, is separated by a comma. (Note that there is no comma after the last field). Finally, the entire statement is terminated by a semicolon.

The column names (color-coded in blue) can consist of any alphanumeric character, as well as the underscore '_' and dollar '$' characters. You can use any of these characters to start a column name, but you can't have a name that consists solely of numbers. Having said that, be careful if your column name is numeric and has an 'e' in it. You can create ambiguous situations if you have a column name like '16e'. If you create a query that adds a number to that column, such as '16e + 10' it could possibly be interpreted as a number in scientific notation.

The MySQL data types shown in bold are a few of the more common ones that you'll probably be using when you start out. There are more types, and good reasons to use them, but we'll learn more about that later. For now, feel free to use these. Here's what you need to know about them.

A CHAR(x) type is a fixed-length character string. The value for 'x' should be an integer between 1 and 255. If you are using version 3.23 or higher, you can use integers between 0 and 255. If the string is shorter than x, it will be padded to the right with spaces. When the value is retrieved, the trailing spaces are removed. If the string is longer, it'll be chopped off at whatever length 'x' is when you store it in the table.

VARCHAR(x) is a variable length string, specified with an integer between 1 and 255, or 0 and 255 for version 3.23 or higher. Any trailing spaces on the string are removed when it's stored. If it's longer than 'x', it too will be truncated to a length of 'x'.

A column with a type of DATE has data that is stored in "YYYY-MM-DD" format. The allowable range is from "1000-01-01" to "9999-12-31". A TIME column uses the standard time format of "hh:mm:ss", with a range of "-838:59:59" to "838:59:59". If you use these formats as shown, you'll need to enclose the values in quotes. You can insert a date as "yymmdd" or a time as "hhmmss", and in those cases you don't need to use quotes. I'll give you examples of each format and how to use them shortly.

This is how you create a table
CREATE TABLE MyFirstTable(

-> FIELD_1 INT,

-> FIELD_2 CHAR(5),

-> FIELD_3 VARCHAR(50),

-> FIELD_4 DATE,

-> FIELD_5 TIME );

This is how you create a database.
create database MyFirstDatabase;

And how you use that database.
USE MyFirstDatabase;

How to use the MySQL client How to manage you database. This shows you how to manage mysql. I will now read through it.

How to install and configure MySQL for Windows
After reading thisi article, I found it to be very easy to understand. It is a great article to help someone install and start using mysql! Highly recommneded!

make sure that you always put the ; at the end of the sql statement. I have had some problems with that already.

Testing your MySQL installation: "When you want to start the mysql client as the administrator, you'll have to do it like this:# mysql -u root -p"

How to install and configure MySQL for Windows
Now I am reading this article.....the other article is probably good, but it is aimed at people intalling and using php and mysql in linux.

PHP/MySQL Tutorial
I am about to read through this tutorial on php/mysql. What I really want to learn is the mysql. I will try to to blog all of the important things that I get out of it.

It looks like a had a little hitch, but I think I fixed it. I am trying to make this work with the blog this plug-in in firefox. The ftp is what keeps giving me errors.

Well, I guess that I finally got this thing up and running. I am glad too, because I was getting a little bit frustrated. I don't know why it would work with the ftp server that I set up at home. I guess thats life. At least I now have a good place to put all of my notes up, and a good place to store my thoughts and findings and stuff.

I have been stuggling setting up this blog. I could get this site to ftp into my home computer. Now I am trying my spencerpope.com site.

This page is powered by Blogger. Isn't yours?