Search found 41 matches

by lolpix
Sat Jul 31, 2004 11:57 pm
Forum: PHP - Code
Topic: Can't get my login script to work
Replies: 22
Views: 2543

and that makes it harder for me to copy and paste your form onto my site and then add malicious things to it.... why? if($var == TRUE) if((int)$var == 1) Doesn't really change anything. Good point, the only thing it does insure is that whatever $var is, is now an integer. We could test for === but ...
by lolpix
Fri Jul 30, 2004 3:41 am
Forum: General Discussion
Topic: installing php
Replies: 4
Views: 1030

I use the entropy install for my sandbox, see http://www.entropy.ch/software/macosx/. This guy has created several installers for things like PHP, MySQL, and PostgreSQL. I am not sure I would use them in a tactical environment, but for practicing on a local machine they work great. If you PM me with...
by lolpix
Fri Jul 30, 2004 3:16 am
Forum: PHP - Code
Topic: need syntax for $string=true or $string=false
Replies: 2
Views: 763

A = B // A is now equal to B
A == B // A and B are equal.
A === B // A and B are equal and of the same type, i.e., TRUE is TRUE and 1 is one 1, but 1 is NOT TRUE.
by lolpix
Fri Jul 30, 2004 2:45 am
Forum: PHP - Code
Topic: Can't get my login script to work
Replies: 22
Views: 2543

Sorry, I have been off trying to pay the rent. Has this worked for you at all?
by lolpix
Sun Jul 25, 2004 4:17 am
Forum: PHP - Code
Topic: Another Parse Error
Replies: 16
Views: 2906

Maybe this is causing problems?

Code: Select all

www.sonicage.com/$username.
Perhaps it is trying to concatenate $username with a variable (because of the period) that never comes?
by lolpix
Sun Jul 25, 2004 4:15 am
Forum: PHP - Code
Topic: Another Parse Error
Replies: 16
Views: 2906

This bit of code looks okay... <?php $Subject = "Your Sonicage Blog Account"; $Message = "Welcome to Sonicage Blog! Here is your information: <br /> Name: $name <br /> Username: $username <br /> Password: $password <br /> <br /> Your blog is viewable at http://www.sonicage.com/$userna...
by lolpix
Sun Jul 25, 2004 2:00 am
Forum: PHP - Code
Topic: display shopping cart help
Replies: 11
Views: 1444

Are you sure you are following the toot line for line? With the exception of the $result variable the code I quoted appears to be doing nothing.
by lolpix
Sun Jul 25, 2004 1:50 am
Forum: PHP - Code
Topic: display shopping cart help
Replies: 11
Views: 1444

Maybe I am wrong, but all this is nonsense... function RemoveItem($itemId) mysql_query("delete from cart where cookieId = '" . GetCartId() . "' and itemId = $itemId"); $result = mysql_query("select * from cart inner join items on cart.itemId = items.itemId where cart.cookieI...
by lolpix
Sun Jul 25, 2004 1:49 am
Forum: PHP - Code
Topic: display shopping cart help
Replies: 11
Views: 1444

function RemoveItem($itemId) should be RemoveItem($itemId); ?
by lolpix
Sun Jul 25, 2004 1:29 am
Forum: PHP - Code
Topic: display shopping cart help
Replies: 11
Views: 1444

Tell me if this helps switch($_GET&#1111;"action"]) &#123; case "add_item": AddItem($_GET&#1111;"id"], $_GET&#1111;"qty"]); ShowCart(); break; case "update_item": UpdateItem($_GET&#1111;"id"], $_GET&#1111;"qty&q...
by lolpix
Sun Jul 25, 2004 12:43 am
Forum: PHP - Code
Topic: shopping cart tutorial help
Replies: 5
Views: 889

Does this help at all? <?php include("db.php"); // Get a connection to the database $cxn = @ConnectToDb($dbServer, $dbUser, $dbPass, $dbName); $result = mysql_query("select * from items order by itemName asc"); ?> <html> <body> <table> <?php while($row = mysql_fetch_array($result...
by lolpix
Sun Jul 25, 2004 12:36 am
Forum: PHP - Code
Topic: shopping cart tutorial help
Replies: 5
Views: 889

No offense, but there is SO much wrong this script I am not sure where to begin. For starters, you have started a "while" loop but have not closed it. To make matters worse, even if you had closed it, your while loop is creating a new page on every iteration by printing... <html> <body> <t...
by lolpix
Sun Jul 25, 2004 12:05 am
Forum: PHP - Code
Topic: Can't get my login script to work
Replies: 22
Views: 2543

To be more truthful, I am sort of paranoid, and what I would do in real life is have the hidden form be name="login_attempted" value="1" and cast the value of $login_attempted to an integer before checking it like so... <?php $login_attempted = (int) $_POST['login_attempted']; if...
by lolpix
Sat Jul 24, 2004 11:37 pm
Forum: PHP - Code
Topic: Can't get my login script to work
Replies: 22
Views: 2543

Here is what I do, it may be not be the best way (feyd probably knows the best way to do damn near everything, respectfully), but it works. I add a hidden form field. In this case I would handle it like so name="login_attempted" value="TRUE", then I would look for $login_attempte...