nav33n 472 Purple hazed! Team Colleague Featured Poster

Select "I approve" to the respective post (and write some comments if you want to) and click on "Add to reputation".

tuse commented: Thanks! +1
nav33n 472 Purple hazed! Team Colleague Featured Poster

Ah! Thanks.. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Thanks.. But I don't know that person :S

nav33n 472 Purple hazed! Team Colleague Featured Poster

Is there a way to know the members you referred to Daniweb ? ( I don't remember referring anyone to Daniweb but I have Member Referrals: 1 ) :-/ How is that ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

And also, there is no guarantee that the active members of a forum knows everything.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Why not decide what value to choose after you submit the page ? Check this for example.

<?php
if(isset($_POST['submit1'])) {
	print $_REQUEST['firstname'];
} 
if(isset($_POST['submit2'])) {
	print $_REQUEST['lastname'];
}
?>
<html>
<head>
<SCRIPT language="JavaScript">
function decide_action() {
x = document.pressed
	if (x == "First") 
		{
		myname =document.forms['frm1'].elements['firstname'].value;
		document.frm1.action ="test.php";		
		}
	else if (x == "Last") 
		{
		myname=document.forms['frm1'].elements['lastname'].value;	
		document.frm1.action ="test.php";
		}
}  	 
</SCRIPT>
</head>
<body>
<form method="post" name="frm1" onSubmit="javascript: decide_action();">
<input type="text" name="firstname"><br>
<input type="text" name="lastname"><br>
<INPUT TYPE="SUBMIT" name="submit1" onClick="document.pressed=this.value" VALUE="First">
<INPUT TYPE="SUBMIT" name="submit2" onClick="document.pressed=this.value" VALUE="Last">
</form>
</body>
</html>

If this isn't what you are looking for, then I am sorry ! I didn't get your question right.

nav33n 472 Purple hazed! Team Colleague Featured Poster

$result=mysql_query("SELECT * FROM artists_details, attendance WHERE ethnicity='maori' AND date='record_id' BETWEEN 'date1' AND 'date2'");

The query is wrong.
Try this.

$result=mysql_query("SELECT * FROM artists_details, attendance WHERE ethnicity='maori' AND date='record_id' and date BETWEEN 'date1' AND 'date2'");

You have to specify which column to check while using 'between' clause.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Dang! I can also post comments on the "main site" ( http://www.quickonlinetips.com/archives/2005/02/secrets-of-domain-masking-how-it-works-for-you/ ) from my php script ! (list.php)

nav33n 472 Purple hazed! Team Colleague Featured Poster

I don't know if this is an answer to your question, but you can get the contents of the third party url and use it in your script! <a href="list.php">Click here to see the list </a>

//list.php
<?php
$contents = file('http://www.quickonlinetips.com/archives/2005/02/secrets-of-domain-masking-how-it-works-for-you/');
foreach ($contents as $data) {
    echo $data;
}
?>

This will get the contents of the specified url and prints it.
Hope that helps!

nav33n 472 Purple hazed! Team Colleague Featured Poster

http://www.webreference.com/js/tutorial1/opener.html
Exactly what you are looking for!
(Check the opener property example)

nav33n 472 Purple hazed! Team Colleague Featured Poster

How can i add the data from the array to a Mysql table?

If you have a multidimensional array (or even a normal array), you should go through each and every element of the array (iterate it) and then insert the value to the table. For example,

$array = array("a","b","c","d"); //an array with 4 elements which you want to insert to the table
foreach ($array as $value) { //for each element of the array insert the value
  $query = "insert into table (col1) values ('$value')"; 
   mysql_query($query);
}

I think this should be enough.
Cheers,
Nav

nav33n 472 Purple hazed! Team Colleague Featured Poster

Php has a default upload size of 2mb. You need to change your php.ini file to increase it.
This might be of some help!
http://us3.php.net/manual/en/ini.core.php#ini.post-max-size
http://us3.php.net/manual/en/ini.core.php#ini.upload-max-filesize
and
http://us3.php.net/features.file-upload

nav33n 472 Purple hazed! Team Colleague Featured Poster

Try this.

$link = "<a href=reset-password.php?ui=".$row['user_id']."&ak=".$upassword.">Reset the Password </a>";

and
$update-password is not a valid variable name. You can't use -. More about it here.
http://in.php.net/language.variables
So, your update query should be like this.

$update_password = mysql_query("update tbl_auth_user set user_password ='$upassword' where user_id = '".$row['user_id']."'") or die("Password reset failed");

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

shade out ? You mean read only ?
<input type="text" name="id" readonly>

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hi there! I haven't heard of bouncy castle light weight cryptography, but php has many encryption techniques. There is base64_encode and base64_decode . You can also use sha1 or md5 encryption.
Remember! php.net is your php bible :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

http://w3schools.com/php/php_mysql_insert.asp
Check out the example. I think this is what you are looking for!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Guys! take it easy.. There is some kinda misunderstanding here.. :) Since the problem is solved, lets stop it right there and not make this a fight thread..
Cheers,
Nav

nav33n 472 Purple hazed! Team Colleague Featured Poster

and a chisel.

chisel :-/ Why ?

scru commented: It's a trade secret. +3
nav33n 472 Purple hazed! Team Colleague Featured Poster

The code works fine for me :) See if you have created the folder and it has all the permissions !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Umm.. A cup of coffee and a cigarette :)

Ezzaral commented: Breakfast of champions :) +9
nav33n 472 Purple hazed! Team Colleague Featured Poster

Everything is fine in the above posted code. The only line which gave me an error was this line. $ext = $this->getExtension($img_name); Remove $this and everything will work great !

Kavitha Butchi commented: thankyou fr ur time +1
nav33n 472 Purple hazed! Team Colleague Featured Poster

I totally agree with Kkeith29. Having different tables for each movie is not a good idea. If you plan to implement something, for example, a "database search" for a movie name, would you go through each and every table ?
Anyway, If you want all the tables in the database, then "show tables" would be the query to list all the tables in that database.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Mark inappropriate threads (like this one) as "Bad post". Moderators will take care of these ad guys! ;)

peter_budo commented: Yes, we do take care of such things ;) +8
nav33n 472 Purple hazed! Team Colleague Featured Poster

http://www.tizag.com/phpT/fileupload.php If you notice, $target_path is the path where the image is being uploaded. Save $target_path in the database :)

Btw, If you search Daniweb, you will find plenty of threads on the same question !

nav33n 472 Purple hazed! Team Colleague Featured Poster

If you observe your query in any good editor, you will see the 'missing' factor. The last variable '$manufacture of' is causing the error. A variable name cannot have a white space. For example, $variable name is NOT a valid variable name. It should be $variablename. Thats the error.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Your mail function is perfectly fine. Does it give you any error other than "Failure" ? Umm..have you disabled error reporting ? Have you set sendmail path in php.ini ? usually, /usr/sbin/sendmail is the path for sendmail.

nav33n 472 Purple hazed! Team Colleague Featured Poster
if(empty($_REQUEST['hiddenfieldname'])) {
echo "Blah";
} else {
echo $_REQUEST['hiddenfieldname'];
}

Like this ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

If you want to add numbers, try total = parseInt(form1.balance.value) + parseInt(form1.buy.value);

nav33n 472 Purple hazed! Team Colleague Featured Poster

LAMP is nothing but Linux Apache Mysql Php. WAMP is a windows package which has preconfigured apache, mysql and php. You just have to install Wamp on a computer with Windows OS.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Huh! Strange.. Your session settings in php.ini looks good.. Your script executes without a problem here.. :-/ I don't understand !

nav33n 472 Purple hazed! Team Colleague Featured Poster

umm.. I am sorry my friend ! This is all I know :(

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yep.. There is just an echo.. You have to add your own code to do whatever you want instead of echoing it..

nav33n 472 Purple hazed! Team Colleague Featured Poster

Umm.. There are some things you need to know before 'creating' a variable. A variable can't start with an integer. For example, $123variable is not a valid variable name. More about it here..
http://nl2.php.net/language.variables
And $logged will have the value that you assigned to it. For example,

<?php
$logged = "yes";
if($logged == "no") {
    echo "Not logged in";
} else {
  echo "Logged in..";
}
nav33n 472 Purple hazed! Team Colleague Featured Poster

You mean like this ?

<html>
<head>
<script type="text/javascript">
function dropdown(dropdown) {
	if(dropdown.value == "") {
		alert("Nothing selected..");
		return false;
	} else {
		alert(dropdown.value);
		return true;
	}
}
</script>
</head>
<body>
<?php
define("DIR", "other/");
define("FILENAME", "Name");
define("EXTSTR", "ram");
define("EXTDOW", "mp3");


if(isset($_POST['stream'])) {
	echo "Streaming ".$_POST['parts'].EXTSTR;
} 
if(isset($_POST['download'])) {
	echo "Download ".$_POST['parts'].EXTDOW;
}

echo "<FORM NAME=\"form\" METHOD=\"post\" onSubmit=\"javascript: return dropdown(this.parts);\" action=\"file.php\">";
echo "<select name=\"parts\"><option value=\"\"> - Select Part - </option>";

$file = DIR.FILENAME."01.";
echo "<option value=$file>Part 1</option>";

$file = DIR.FILENAME."02.";
echo "<option value=$file>Part 2</option>";

$file = DIR.FILENAME."03.";
echo "<option value=$file>Part 3</option>";

$file = DIR.FILENAME."04.";
echo "<option value=$file>Part 4</option>";

$file = DIR.FILENAME."05.";
echo "<option value=$file>Part 5</option>";

echo "</select>";
echo "&nbsp;<INPUT TYPE=\"submit\" VALUE=\"Stream\" name=\"stream\">";
echo "&nbsp;<INPUT TYPE=\"submit\" VALUE=\"Download\" name=\"download\">";
echo"</FORM>";
?>
</body>
</html>
nav33n 472 Purple hazed! Team Colleague Featured Poster

i'm just not sure how to 'implement' -if you will- the return-statement in your if-statement. do you see what i mean?

What do you mean by return statement in if statement ? Can you post an example to show what you actually meant by that ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

I don't get it. Here is a simple example.

<?php
if(isset($_POST['submit'])) {
	print_r($_POST['check']);
}
?>
<html>
<body>
<form method="post" action="checkbox.php">
<input type="checkbox" name="check[]" value="1"> 1 <br />
<input type="checkbox" name="check[]" value="2"> 2 <br />
<input type="checkbox" name="check[]" value="3"> 3 <br />
<input type="checkbox" name="check[]" value="4"> 4 <br />
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
nav33n 472 Purple hazed! Team Colleague Featured Poster

Can you post your latest code ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

$variable = $_POST['form_variable_name']; More about it here. http://w3schools.com/php/php_post.asp
You should sanitize user's input by using mysql_real_escape_string or addslashes .

nav33n 472 Purple hazed! Team Colleague Featured Poster

Umm.. No.. mysql_query returns different values for different queries. I just tested and I found out, for a query which doesn't return any resultset, like, update or delete,returns just true. But for a select query, it returns a result (resource id).

nav33n 472 Purple hazed! Team Colleague Featured Poster

Instead of die ('query not processed'); give die(mysql_error()); and tell us what it prints.

nav33n 472 Purple hazed! Team Colleague Featured Poster

It's so called "script injection".

Are you using Wordpress blogs or WP-Stats in your website? For they are particularly vunerable?.The way that is done is with specially crafted SQL using certain parameters to then gain access to the back-end database.

Check your database and see the post in there.

Oh, cross site scripting ! Hmm..

nav33n 472 Purple hazed! Team Colleague Featured Poster

Well, when you submit the form, only the selected checkboxes will be posted to the next page. You can see what values are being posted by using print_r($_POST['checkboxname'] You can loop through $_POST (since that will be an array of checked values) and display the data however you want !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Here is the idea.
Pass the id of the image in the query string. <a href='deleteimage.php?id=4'>Delete now </a> Then, in deleteimage.php, get the id, and delete the image.

//connection
$id = mysql_real_escape_string($_GET['id']);
$q = "delete from table where imageid = '$id'"; // if you are storing the image in the table (which is a very bad idea)
mysql_query($q);
//redirect the user back to the image display screen
nav33n 472 Purple hazed! Team Colleague Featured Poster

I am not sure if its possible in Php. But its definitely possible in javascript.

<html>
<head>
<script type="text/javascript">
function getformname(form) {
	alert(form.name);
	return false;
}
</script>
</head>
<body>
<form name="test" action="test.php" method="post" onsubmit="javascript: return getformname(this);">
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

Cheers,
Nav

nav33n 472 Purple hazed! Team Colleague Featured Poster

Oh, You can access the values as $value = $_GET['variablename'] Don't forget to sanitize the user's input by using mysql_real_escape_string or addslashes.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hmm.. I am not sure if your site is hacked.. But when that javascript was 'decoded', it gave me the url, http://www.wp-stats-php.info/ . The complete URL was

<iframe src=http://www.wp-stats-php.info/iframe/wp-stats.php width=1 height=1 frameborder=0>

Umm.. Have you seen this iframe before ? I have never been in this position before, so maybe someone else has something better to say..

nav33n 472 Purple hazed! Team Colleague Featured Poster

If it just returns the filename associated with the selected option in the dropdown list, then the code I posted above should work for you !

nav33n 472 Purple hazed! Team Colleague Featured Poster

You can set a cron job to run on the 1st day of every month (or the last day of every month) and execute the required script to generate the report.

nav33n 472 Purple hazed! Team Colleague Featured Poster

The application is good.. But there is kinda delay (?).. umm..I think the 2 second delay is taking more time than that..
One more thing..

<test3> test
<test3> test33
<test3> test445
<test3> huh
<Admin> test4 has left the chat

I got kicked out of chat but wasn't redirected to the login page. I was still in the chat window.

<test3> huh
<Admin> test4 has left the chat
<test3> test
<test3> testtttt
<> huh

there is no name in the last message. That is, It still says I am test4, but it doesn't show "test4" in the users list.. It doesn't show my name (test4) when I enter a message. Check the attachment to see what I am talking about..

nav33n 472 Purple hazed! Team Colleague Featured Poster

The problem is,

if((!empty($_FILES["car_info_file"])) && ($_FILES ==

and all will not be accessible inside the function. Instead, pass $_FILES as parameter for the function.

upload_files($_FILES);

Then you can access it in your function like,
$fil and so on..

Btw, type is application/xls..