Forum: PHP 13 Days Ago |
| Replies: 4 Views: 240 In that case if the missng {} is not the issue, you may want to check that $user_name contains the relevant information. try a print_r($user_name) before you execute the mentioned code and see if it... |
Forum: PHP 13 Days Ago |
| Replies: 4 Views: 240 should be
<?php
while($results = mysql_fetch_array($user_name)) {
if ($results['email'] == $Entered_UserName && $results['password'] == $Entered_PassWord) {
echo 'its... |
Forum: PHP 14 Days Ago |
| Replies: 15 Views: 383 Haha... I should have known that: :$ |
Forum: PHP 15 Days Ago |
| Replies: 15 Views: 383 you could also make a function out of it
<?php
function arrayToString($array) {
$string = '';
foreach($array as $value) {
$string .= "{$string}, {$value} ";
}... |
Forum: PHP 15 Days Ago |
| Replies: 15 Views: 383 Oh i see...
<?php
$string = '';
$engineers = $_POST['Prefered_Engineers'];
foreach($engineers as $engineer) {
$string .= "{$string}, {$engineer} ";
}
?> |
Forum: PHP 15 Days Ago |
| Replies: 15 Views: 383 apologies the function was a demonstration of how to access the the values in the array. you can use the same function to perform other actions, such as send the values to the data base. It will... |
Forum: PHP 15 Days Ago |
| Replies: 15 Views: 383 It happens to the best of us ;) |
Forum: PHP 15 Days Ago |
| Replies: 15 Views: 383 As much as I try and aviod overposting more experienced and respected posters, if you remove the [] that will only let you select 1 of the checkboxes and not multiple. If you want multiple You need... |
Forum: PHP 15 Days Ago |
| Replies: 7 Views: 245 it would also be a good idea to place the delete from database call inside an if statement, that way if the file delete fails you will still have the database info. That kind of coincides with ardavs... |
Forum: PHP 16 Days Ago |
| Replies: 19 Views: 482 I'm sure you dont want to cuase an infinite loop. What are you trying to do? |
Forum: PHP 16 Days Ago |
| Replies: 4 Views: 250 the concatenation full stops seem to be inside the string. try this:
$data = "UPDATE inventors SET month='$month',day='$day', year='$year', date='$year" . "-" . "$month" . "-" . "$day' WHERE... |
Forum: PHP 17 Days Ago |
| Replies: 4 Views: 211 They are normaly done in HTML.
<html>
<body>
<select name="menu">
<option value="opt1">Option 1</option>
<option value="opt2">Option 2</option>
<option... |
Forum: PHP 18 Days Ago |
| Replies: 13 Views: 462 There has recently been a post (http://www.daniweb.com/forums/post1046864.html#post1046864) similar to yours and I don't believe you can use the switch statements like that. change them to if/elseif... |
Forum: PHP 20 Days Ago |
| Replies: 109 Views: 3,534 why not just use the username or one of the existing data base fields as a salt? that way it will be unique for each password. |
Forum: PHP 20 Days Ago |
| Replies: 6 Views: 339 Are you talking about having inputs of a function that may not be used but could be?
example
<?php
function doStuff($a='not set', $b='not set', $c='not set') {
echo $a. "<br />";
... |
Forum: PHP 21 Days Ago |
| Replies: 9 Views: 325 Thanks nav33n, I was tought that integers could not have the single quotes. perhaps I confused it with best pracice at the time.
So the issue was with the fucntion and the quotes around it? |
Forum: PHP 21 Days Ago |
| Replies: 9 Views: 325 Im not too sure what you are asking? can you provide an example? |
Forum: PHP 21 Days Ago |
| Replies: 9 Views: 325 It could be that you are using single quotes around the values that are meant to be integers, the single quotes are converting them to strings. try removing the single quotes but wrap the variable in... |
Forum: PHP 22 Days Ago |
| Replies: 4 Views: 221 I take it you are also using ob_end_flush() at the end? |
Forum: PHP 22 Days Ago |
| Replies: 4 Views: 233 No Worries glad I could help. |
Forum: PHP 22 Days Ago |
| Replies: 4 Views: 233 I am a little confused to what you are asking but I think you might mean.
//your code is put into an if statement
<?php if (!mysql_query("$sqlcommandvariable")) die(mysql_error()); ?>
//... |
Forum: PHP 23 Days Ago |
| Replies: 1 Views: 129 I am just taking a stab in the dark here but you could try using a wirless mouse as the "Big Red Button" and you could set a delay for the application to run. Check out ... |
Forum: PHP 23 Days Ago |
| Replies: 20 Views: 456 I think that venkat0904 doesnt want to refresh the page.
Check out these few examples, they should point you in the right direction. I am currently trying to learn AJAX myself these are quite... |
Forum: PHP 23 Days Ago |
| Replies: 2 Views: 217 is the file sql_Conn.php in the same directory as the file you are including it from? Also check that you have not inadvertantly made an error in the filename of the physical file in the directory. 1... |
Forum: PHP 24 Days Ago |
| Replies: 3 Views: 210 a nice little trick I have been shown is to defne a shorter constant for DIRECTORY_SEPARATOR.
<?PHP
defined('DIRECTORY_SEPARATOR') ? null : define('DS', DIRECTORY_SEPARATOR);
?>
you... |
Forum: PHP 27 Days Ago |
| Replies: 20 Views: 456 Apologies you are correct, I misread the original post. |
Forum: PHP 27 Days Ago |
| Replies: 20 Views: 456 All you need to do is submit the page to itself from the form tag. you will also need to make sure you give your submit button a name attribute. For example.
<form action="index.php"... |
Forum: PHP Oct 22nd, 2009 |
| Replies: 4 Views: 277 you might want to add stripslashes() to the mysql_real_escape_string() because if the password has any special chars in it the stored password will have slashes is it, and the password you are... |
Forum: PHP Oct 19th, 2009 |
| Replies: 4 Views: 277 which part are you having issues with? The use of sha1() or the sql to change the password?
Post your change password script if you have one |
Forum: PHP Oct 14th, 2009 |
| Replies: 2 Views: 213 Thanks, I had already looked at that and it was giving me erros. I found the answer in the DOM. I overlooked that when i looked before.
Thanks |
Forum: PHP Oct 14th, 2009 |
| Replies: 2 Views: 219 you just need to add a comma between the email addresses.
e.g.
$to = "example@domain.com", "example2@domain.com"; |
Forum: PHP Oct 13th, 2009 |
| Replies: 2 Views: 213 Hi All, i am trying to write an application that will take an XML file that has been saved from an XLS spreadsheet and display the data. I will be ok with how to display the data i just dont know... |
Forum: PHP Oct 12th, 2009 |
| Replies: 107 Views: 3,380 gone are the days of uploading vids to youtube more than 10 min. The only people that are allowed these days are the 'Gurus' that were allowed before that rule came in |
Forum: PHP Oct 7th, 2009 |
| Replies: 2 Views: 221 $host = 'localhost';
$user = 'DatabaseUsername';
$pass = 'DatabasePassword';
$dbName = 'DatabaseName';
$connection = mysql_connect($host, $user, $pass) or die("could not connect to the database... |
Forum: PHP Oct 7th, 2009 |
| Replies: 4 Views: 318 Are there any cookies that are authenticating the user? |
Forum: PHP Oct 6th, 2009 |
| Replies: 107 Views: 3,380 Apologies, I have since looked and can see you have covered that.
Great site! |
Forum: PHP Oct 6th, 2009 |
| Replies: 107 Views: 3,380 I think a tutorial on best proctices on how to secure your site. IE. login and authentication on each page would be nice. Im sure alot of people will make good use of that. |
Forum: PHP Sep 30th, 2009 |
| Replies: 11 Views: 3,646 mysql_real_escape_string(); will prevent injections.
e.g.
<?php
$string = 'user input';
$safer = mysql_real_escape_string($string);
// the variable $safer is less likely to cause you any... |
Forum: PHP Aug 27th, 2009 |
| Replies: 4 Views: 208 I started at http://www.tuxradar.com/practicalphp and I learned quite alot. I found that i did need to go back over a few things and research a little deeper (Google is your friend) but it a good... |
Forum: PHP Aug 26th, 2009 |
| Replies: 7 Views: 312 it happens to us all, I have done it a few times myself :P Glad I was a help :-) |