182x
Members-
Posts
179 -
Joined
-
Last visited
Never
Everything posted by 182x
-
Hey guys, I have developed a login script where the users passwords are stored in the db using the crypt method of encryption. I was just wondering is the following the correct way to assign the encrypted data to a variable so it can be compared in a query? or will this method fail as it is one way encryption? $password = crypt($_POST['password'], 'salthere); //sql here i.e select * from user where uname=$uname and password=$password;
-
Thanks, am I correct in assuming that the ".." in the path means go back back one directory? So if "../../" was used it means go back two directories?
-
Will give that a try, thanks.
-
Could this then lead to any problems that I have used a relative path? Although in testing it seems fine.
-
hey guys, I was reading a tutorial on PHP and it referes to absolute and relative paths I was just wondering is the following "../test/test2/test.php" classed as an absolute or relative path? The reason I ask is that I always thought it was a relative path but in the tutorial for jpgraph it states that only absolute paths can be used and the above style works. thanks.
-
Hey guys, I was wondering in jpgraph is there anyway to display the graph within the main part of the php page (within the body tags) as i always get the headers already sent error so the graph has to be generated at the top of the page. Is there a way round this or a way to store the graph then re-display it? Thanks,
-
Hey guys, When performing a query in PHP can you use the same mysql_query() results once the php tags where the query resides are closed and another set of php tags are opened for example: <?php //query here ?> <?php //can I use the first mysql_query results again here, or does a new query have to be performed? ?>
-
Hey guys, I have been reading all the tutorials and class reference for JpGraph but I was just wondering if its possible to plot individual points without using an array? for example in libchart the following code is used but I can't figure out how do do this in JpGraph as all the examples use arrays. Any help would be great, Thanks. <?php include "libchart/libchart.php"; header("Content-type: image/png"); $chart = new VerticalChart(500,250); $chart->addPoint(new Point("Jan 2005", 273)); $chart->addPoint(new Point("Feb 2005", 321)); $chart->addPoint(new Point("March 2005", 442)); $chart->addPoint(new Point("April 2005", 711)); $chart->setTitle("Monthly usage for www.example.com"); $chart->render(); ?>
-
hey guys, I was just wondering how to assign the appropreate permissions so files can be removed using unlink in MS Vista. I have set the folder to allow full access to all users but this does not seem to be enough. So is there anything else I can try? Thanks.
-
What if a field is of type VARCHAR but the value entered into it is a integer does it need the quotes?
-
Hey guys, When creating queries in PHP for example: $test="SELECT test FROM test WHERE testId = $testId"; Should there be single quotes round any part of the query? It works fine as it is, I just want to be sure I am writing my code to the proper standard. Thanks.
-
how do you test if a cell is empty though is there is default values or null is not used?
-
Hey guys, I have designed a table which gets its data dynamically from a MySQL database, if there is an empty cell in the table it looks fine in firefox but in i.e it looks different as if the empty cell has been extruded unless there is something like <td> </td> in the table cell. I was just wondering is there anyway round this problem so the empty cells don't look extruded in the IE browser? Thanks.
-
If I add that I then get the following errror: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
-
hey guys I keep getting the following error with the following code where temp is an actual value, I know it has something to do with the $row syntax just wondering if you can point out what I did wrong? Thanks error: Unknown column 'temp' in 'where clause' $get = "SELECT * FROM user WHERE username = $username"; $query = mysql_query($get, $link_id)or die(mysql_error()); $row = mysql_fetch_array($query); $hold="INSERT INTO supp VALUES('','{$row['level']}','$username','{$row['name']}','{$row['carrN']}','{$row['mIp']}','$da', '$daT', 'thank you', 'hU')"; mysql_query($hold, $link_id)or die(mysql_error());
-
Hey guys just wondering when displaying the following information how to I put a space between them? I have tried ' ' and .' '. but none of these work. Thanks, <?php echo $rowU1['username'], $rowU1['firstName']; ?>
-
I will do, Just tried the code. It didn't work It first gave a syntax error because of the extra " ' " so I removed it and added braces. But then I get the the following error where jess is an actual username. Anyideas why this is happening? Unknown column 'jess' in 'where clause'
-
Thats awesome, thanks for your help.
-
Thanks, how do you query off the first query result?
-
I also have to delete data from another table when data is deleted from the first one and the username is what links the tables
-
That may not have been clear I mean how do I send the extra piece of information, I have already got the rest setup.
-
hey guys, I have a page which displays a tables of users from a database and I on this page the user can select someone to remove from the database in order to do this they select the username from a listbox which only contains the userIds. When this userId is sent for processing I would also like to be able to send the related username without the user having to select it. How can I do this? Thank you
-
with both I recieve the following error, anymore syntax suggestions? Parse error: syntax error, unexpected T_VARIABLE