User Profile
Collapse
-
I realize what went wrong now... I FORGOT TO CONNECT TO THE DATABASE. Thanks for your help. -
PHP and mysql: Login query??
...Code:function log_in($uname,$pword){ if (mysql_num_rows(mysql_query("SELECT `iduser`, `cardno` FROM `user` WHERE `uname` = 'Steffan_James' AND `pword` = 'collingwoodcard'"))){ $res = mysql_query("SELECT * FROM `user` WHERE `uname` = 'Steffan_James' AND `pword` = 'collingwoodcard' LIMIT 1"); $row = mysql_fetch_array($res); setcookie('id',$row["iduser"],2592000 + time(),'/'); setcookie('cno',$row["cardno"],2592000 -
String conversion
My flash file gets 2 vars from a php file, but, when they appear in the Dynamic Textboxes, they show with the quotes around them. And, how would I convert a real value to a string? Thanks for your help! -
EDIT: Never mind, i fixed it myself. WhoopsLeave a comment:
-
-
use a variable in a function?
[PHP]function flash_search()
{
$query="SELECT score FROM hi WHERE name='$sname'";
$scre=mysql_que ry($query);
$res=mysql_fetc h_array($scre,M YSQL_ASSOC);
echo $sname;
echo $res["score"];
}[/PHP]
This, by some crazy therory, should display the name and score of one person in my database.
This is where $sname="Test" (an existing user)
the... -
Oh, and by the way, the php action for modify_table is sent silently by an exe made by meLeave a comment:
-
-
i would be talking to roverdonk thank you... i tried using it directly, but it didn't workLeave a comment:
-
Thank you for the answer, my code has many encryptions elsewhere, that was just a snippet. edit- is this a direct code? can i copy/paste? or do i need to adapt it? i don't mind either way...Leave a comment:
-
Adding to an existing value. (integer)
[PHP]<?php
//this function is the responsible of modifying the player in the table
function modify_table()
{
//first the query try to get a row where the name of the player is = to the name in the url
$query = "SELECT name FROM hi WHERE name='".$_GET["name"]."'";
$res = mysql_query($qu ery) or die("Couldn't execute $query: ".mysql_error() );
...
No activity results to display
Show More
Leave a comment: