Wednesday, November 30, 2011

    <?php



if (isset($_POST["submit"])) {
    $intFirstLoad = 0;
    $strTitle = $_POST["strTitle"];
    $strFirstname = $_POST["strFirstname"];
    $strSurname = $_POST["strSurname"];
    $strUsername = $_POST["strUsername"];
    $strPassword = $_POST["strPassword"];
    $strPassword2 = $_POST["strPassword2"];
    if ($strFirstname != NULL && $strSurname != NULL &&
        $strUsername != NULL && $strPassword != NULL && $strPassword2 != NULL) {
        echo "<p>Greetings $strTitle $strFirstname $strSurname</p>";
        echo "<p>Your username is $strUsername and your password is $strPassword and $strPassword2</p>";
    }
}
else
    $intFirstLoad = 1;
?>

<h2>Enter stuff..</h2>

<form action='<?php echo $_SERVER["PHP_SELF"]; ?>' method='post'>

<?php if ($strTitle == "Select..." && $intFirstLoad == 0) echo "Not Selected" ?>
</p>
<p>
<label for="strFirstname">Firstname: </label>
 <input type='text' name='strFirstname' id='strFirstname'/>
<?php if ($strFirstname == NULL && $intFirstLoad == 0) echo "Not Entered" ?>
</p>
<p>
<label for="strSurname">Surname: </label>
<input type='text' name='strSurname' id='strSurname'/>
<?php if ($strSurname == NULL && $intFirstLoad == 0) echo "Not Entered" ?>
</p>
<p>
<label for="strUsername">Username: </label>
 <input type='text' name='strUsername' id='strUsername'/>
<?php if ($strUsername == NULL && $intFirstLoad == 0) echo "Not Entered" ?>
</p>
<p>
<label for="strPassword">Password: </label>
 <input type='password' name='strPassword' id='strPassword'/>
<?php if ($strPassword == NULL && $intFirstLoad == 0) echo "Not Entered" ?>
</p>
<p>

<p><input type='submit' name='submit'/></p>

Thursday, November 17, 2011

I have the homework section of my site up, as I  cannot turn in assignments without uploading it to my personal webspace, and since I was making a site, and would like practice, I though "eh, why not?"

I do not intend to keep each item I post on their, I will make a page for end of term papers and such, but not assignments worth 5 points.
http://webspace.globeuniversity.edu/arthur.taylor/

php code as follows

<p>Using loop constructs, produce a PHP script which will output a calendar for a normal February (28 days).<br />  You will need to define variables to contain the start day of the month (Sunday, Monday, etc.) and the number of days in the month.<br />
For each day of the month that is an even number, print the value in bold text. Begin the Month on Saturday </p>

<?php
// File: exercise9-6.php

$intStartDayOfMonth = 6;    // Tuesday Start of Month
$intDaysInMonth = 28;       // Days in Month
?>
<table border = '1'>
<tr><td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td></tr>
<tr>
<?php
for($intCurrentWeekDay=0;$intCurrentWeekDay<$intStartDayOfMonth;$intCurrentWeekDay++)
    echo "<td></td>";
$intDay = 1;
while($intDay <= $intDaysInMonth) {
if ($intDay % 2)
echo "<td>$intDay</td>";
else {
echo "<td><b>$intDay<b></td>";
}

 
    $intDay++;
    $intCurrentWeekDay++;

    if ($intCurrentWeekDay == 7) {
        $intCurrentWeekDay = 0;
        echo "</tr><tr>";
    }
}
for(;$intCurrentWeekDay<7;$intCurrentWeekDay++)
    echo "<td></td>";
?>
</tr></table>

Thursday, November 10, 2011

Website!!!

I've decided instead of making an app, to make a website for my self instead, this way I dont have to learn a new language, which I dont have the time to learn at the moment, and I can use this site as a portfolio to show off other projects I've done or the app if I come back to it.


Other than that, had mid terms this week, and we started php in the web tech class.(only done bitwise arithmetic so far)

Tuesday, November 1, 2011

nov 1st

So one of my friends from work who goes to the U of M was telling me about how he and a group of others came up with an idea for a mobile app, which got me thinking "what can I do that I can put in my portfolio". Something that I think will be easy enough, but still a strong enough concept that I can say "I did this" and still be proud of it, is a World of Warcraft add-on.

The first thing I have to do is learn quite a bit of Lua, which is the language that Blizzard uses to program add-ons.

Second, my initial idea is to make a program that adds all auctions that you have up for auction on the auction house and print how much money you would get if everything would sell at that point.


On other notes we start PHP next Monday, at the moment we are working on javascript.
Our first project was to create a table with the numbers 1-10 and their squares, then add all the  numbers in the column at the bottom of the page.
http://webspace.globeuniversity.edu/arthur.taylor/unit4.html