nav33n 472 Purple hazed! Team Colleague Featured Poster

Lets see if someone else can solve this for you :-/

nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php
  // find out the domain:
  $domain = $_SERVER['HTTP_HOST'];
  // find out the path to the current file:
  $path = $_SERVER['SCRIPT_NAME'];
  // find out the QueryString:
  $queryString = $_SERVER['QUERY_STRING'];
  // put it all together:
  $url = "http://" . $domain . $path . "?" . $queryString;
  echo "The current URL is: " . $url . "<br />";
if ( $url == "http://www.xxx.com/yyy" ) {
	echo '<script src="http://www.cpalead.com/mygateway.php?pub=9868&gateid=MTk1MA%3D%3D" language="JavaScript" type="text/javascript"></script>';
}
?>

If you look at line 21, you will see the problem yourself.

<script src=....

should be echoed.

nav33n 472 Purple hazed! Team Colleague Featured Poster

My post count was increased by 200, solved thread was increased by 30 odd and rep power was increased by 1 ! I was wondering if it was a dream only to be dragged back to reality :D

nav33n 472 Purple hazed! Team Colleague Featured Poster

Well, that error number corresponds to the max_file_size in php.ini . http://in2.php.net/manual/en/features.file-upload.errors.php ! Are you sure you changed the correct php.ini file (and restarted apache ?) :S I can't think of anything else other than the max file size.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hmm.. Try printing out $_FILES .. Check if $_FILES is set ! I tested your script with image size varying from 1 mb to 4 mb. Works fine :-/

nav33n 472 Purple hazed! Team Colleague Featured Poster

Try changing upload_max_filesize in php.ini.

nav33n 472 Purple hazed! Team Colleague Featured Poster

is it possible to insert the current timestamp while loading the data in the field created_at

Yes. Use now() . date() doesn't work.

nav33n 472 Purple hazed! Team Colleague Featured Poster

It is possible to open excel in a browser. Google does it with google spreadsheet. :) Maybe there are api's for it. I am not sure.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Try changing the upload_max_filesize in php.ini . The default filesize for upload is 2mb.

nav33n 472 Purple hazed! Team Colleague Featured Poster

What is the error ?
And, instead of

$webspace === '200 mb' && $bandwith === '3000 mb' $payment === '£22.90 per year'

I would suggest you to use only numbers. For example,

$webspace === '200' && $bandwith === '3000' && $payment === '22.90'

Also note that there is no && operator in your statement for $payment.
This query,

$sql="SELECT * FROM data"

isn't terminated with a semi colon.
One more, odbc_fetch_row returns records with numeric indices. You can't use $feat=odbc_result($rs,"Features"); use odbc_fetch_array instead. I guess thats it.

Edit: Oh and please, use [/code ] tags to wrap your codes.[code= php] [/code ] tags to wrap your codes.

nav33n 472 Purple hazed! Team Colleague Featured Poster
nav33n 472 Purple hazed! Team Colleague Featured Poster

lol i should be dead going by that test but like others here some of the options like tea and soft drink dont apply to me as i dont drink tea and rarely drink soft drink but i gotta slow down on the coffee as i cant even keep count of how manny cups i have a day lol

I can see how caffeine is affecting you already. You are typing without even taking a break to breathe! Slow down. :D

nav33n 472 Purple hazed! Team Colleague Featured Poster

Return your girlfriend and install linux guys !

Okay..... Then what ? Cry out loud for being single ? :icon_rolleyes:

Ezzaral commented: !! :) +19
nav33n 472 Purple hazed! Team Colleague Featured Poster

I agree with AD, it's damn hard to quit, I've been smoking 10+ years, but eventually I'll succeed.

I can understand how you feel! I started smoking 6 years ago and finding it very difficult to quit! I had quit for a week, but I didn't have enough will power to overcome the urge. :(
Even the *Smoking is injurious to health* sign on the packs too don't make much of a difference.

Sulley's Boo commented: baakaaaaaa =D +6
nav33n 472 Purple hazed! Team Colleague Featured Poster

Hmm.. yeah.. I guess you are right! :cool:

nav33n 472 Purple hazed! Team Colleague Featured Poster

He was banned because he posted an offensive comment attacking another DaniWeb member in a way which broke the rules. As Rash had already received numerous warnings in the past about such things, and already had an active 5 point infraction on the system, the new infraction took him to the 10 point ban threshold.

Ah! Thanks for clarifying.

However, all members have to abide by the rules and they apply equally even if you happen to be a long-time member and former mod as is the case with Rashakil Fol.

Totally agree with that.
Just wondering, how about having a 'Hall of Shame' to list the banned members and the reason for their ban ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Rashakil Fol was banned because he flagged a blog post by happygeek ? :-/
(That's what Rashakil Fol said in one of his posts which was later deleted!!!)
Umm..He used 'crude words' in his post. Maybe that is the reason it was deleted.

P.S. Maybe his fierce battle with Serkan sendur was another reason ! ;)

nav33n 472 Purple hazed! Team Colleague Featured Poster
nav33n 472 Purple hazed! Team Colleague Featured Poster

ps now im waiting for my fellow posters to attack me.

:angry: *Throws a hand grenade at sitas87*

nav33n 472 Purple hazed! Team Colleague Featured Poster

echo $_SESSION;

You are echoing userid. Are you sure you thoroughly checked it ? :icon_rolleyes:

nav33n 472 Purple hazed! Team Colleague Featured Poster

I don't have any sample code. You can check the above link from phpclasses and modify it to your needs.

nav33n 472 Purple hazed! Team Colleague Featured Poster

ok guys, i am persuaded, cheating is wrong, i gave an empty paper yesterday, and i am not gonna pass the class without understanding these hardware level cpu operations.
you won!

How did you finally come to the conclusion that cheating is wrong ? Why didn't you cheat ?
I am happy you realised cheating is wrong. Better late than never. :icon_rolleyes:

nav33n 472 Purple hazed! Team Colleague Featured Poster

How about a forum for support for games?

Why ? Probably to solve this query ? Eh ?:icon_rolleyes:

verruckt24 commented: Good you caught him +3
nav33n 472 Purple hazed! Team Colleague Featured Poster

http://in.php.net/mysql_select_db Read the comments, especially of buzz at oska dot com :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

http://davidwalsh.name/backup-mysql-database-php A good script to backup the whole database or just a few selected tables.
Note: While generating the backup file, he uses the command drop tablename. You better ignore (comment) that line :)

Edit: I somehow missed 'excel' in your post. This takes the backup on a .txt file (or .sql).

nav33n 472 Purple hazed! Team Colleague Featured Poster

What do you mean by select forms ? If you don't want to use forms you can try this. http://www.phpclasses.org/browse/package/3104.html
If you can use the form, then you can show the data retrieved by the database in a text field and a button at the end, which when clicked, updates the table with the values in these textboxes. :-/

nav33n 472 Purple hazed! Team Colleague Featured Poster

You have done 99% of the work already. You just have to use [] with $media_link and $media_title.

<?php // Load and parse the XML document 
$rss =  simplexml_load_file('http://www.ubcmiami.org/podcasts/podcast.xml');
$title =  $rss->channel->title;

// Here we'll put a loop to include each item's title and link
foreach ($rss->channel->item as $item) {
	if($count <= 4)
	{

		$media_link[] = $item->guid;
		$media_title[] = $item->title;
  		$count++;
	}

}
print "<pre>";
print_r($media_link);
print_r($media_title);
print "</pre>";
?>
nav33n 472 Purple hazed! Team Colleague Featured Poster

i have an error hen i use die mysql_query()

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in E:\wamp\www\weberp\includes\Config.php on line 8

and when i dont us mysql_error() yhen error is

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in E:\wamp\www\weberp\includes\Config.php on line 8

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in E:\wamp\www\weberp\includes\Config.php on line 10

Fatal error: Call to undefined function DB_free_result() in E:\wamp\www\weberp\includes\Config.php on line 20

my code is

if(isset($ForceConfigReload) and $ForceConfigReload==TRUE OR !isset($_SESSION['CompanyDefaultsLoaded'])) {
    $sql = "SELECT confname, confvalue FROM config"; // dont care about the order by
    echo $sql;
    $ConfigResult =mysql_query($sql,$db) ;
 echo $ConfigResult;
    while( $myrow = mysql_fetch_row($ConfigResult)) {
        if (is_numeric($myrow[1]) and $myrow[0]!='DefaultPriceList'){
            //the variable name is given by $myrow[0]
            $_SESSION[$myrow[0]] = (double) $myrow[1];
        } else {
            $_SESSION[$myrow[0]] =  $myrow[1];
        }

    } //end loop through all config variables
    $_SESSION['CompanyDefaultsLoaded'] = true;
    DB_free_result($ConfigResult);

end quote.

Your query seems fine.. Check if you have a valid connection. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

in turkish we have a saying for this : the panth would not stick to your ass unless your ass has been used to it.

:confused: :-/ What does that even mean ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Congrats :) Glad I could help! Cheers!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yep.. That is correct..

nav33n 472 Purple hazed! Team Colleague Featured Poster

I have shown in the "working script". Use ob_start(); and header redirection instead of javascript redirection..

nav33n 472 Purple hazed! Team Colleague Featured Poster
if($variable) {
//statements
}

This simply means, if(true) . If a variable is set and if doesn't have values 0,false,'', it will execute corresponding statements.
Example,

<?php
$a = NULL;
if($a) {
 echo "$a is true<br />";
} else {
echo "$a is false<br />";
}

$a="";
if($a) {
 echo "$a is true<br />";
} else {
echo "$a is false<br />";
}

$a=1;
if($a) {
 echo "$a is true<br />";
} else {
echo "$a is false<br />";
}

$a=0;
if($a) {
 echo "$a is true<br />";
} else {
echo "$a is false<br />";
}

$a=true;
if($a) {
 echo "$a is true<br />";
} else {
echo "$a is false<br />";
}

$a=false;
if($a) {
 echo "$a is true<br />";
} else {
echo "$a is false<br />";
}

$a=100;
if($a) {
 echo "$a is true<br />";
} else {
echo "$a is false<br />";
}

$a=array("10","20");
if($a) {
 echo "$a is true<br />";
} else {
echo "$a is false<br />";
}

$a = "some string";
if($a) {
 echo "$a is true<br />";
} else {
echo "$a is false<br />";
}
?>
nav33n 472 Purple hazed! Team Colleague Featured Poster

>they must have cleaned out all the old ones or started a new forum recently because I know it was fairly popular when I was using it 20 years ago.

you are really ancient :)

It seems like you are begging for trouble :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

I haven't seen anyone using require or include inside a brace like this though.

<?php
(include "db.php");
(require "db.php");
?>

But the point to be noted is, include and require do return a value on successful inclusion. That return value is OK . Strange. I didn't know that :) I wonder what would be the return value on failure.
Also, include and require are not functions. They are language constructs. Hmm! Not bad to learn few new things @ 2-30 am ? Eh ? ;)

nav33n 472 Purple hazed! Team Colleague Featured Poster
nav33n 472 Purple hazed! Team Colleague Featured Poster

As a beginner, I suggest you use the function "require" like this:

(require "includes/common.php");

Yes, require has a different syntax, to avoid future problems, always surround the hole statement with parenthesis.

What future problems are you talking about ? Could you explain this a bit better ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

I haven't used tomcat, but for apache, its http://localhost to access the root directory. You can find the config file httpd.conf in conf directory.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Wow! That was a thrilling match.
But honestly, 50 grand is a huge price amount for just standing and making gestures ! :-/

nav33n 472 Purple hazed! Team Colleague Featured Poster

Cool ! Good luck :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Try or die(mysql_error()); instead of your custom message. This will let you know what exactly is the error.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Did you try using ob_start and header instead of window.location ? If that didn't solve your problem, I can't think of anything to help you. I am at my wit's end !

I want to complete this work. Because it is very urgent.

It maybe urgent for you but not for the members of this community. Have patience and wait for someone else to reply.

nav33n 472 Purple hazed! Team Colleague Featured Poster

There have been so many threads in this forum regarding regular expressions. Most of them have also posted some good regular expression tutorial links.
You can check http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/
http://weblogtoolscollection.com/regex/regex.php
Here, this is a good video tutorial.
http://www.phpvideotutorials.com/regex/

nav33n 472 Purple hazed! Team Colleague Featured Poster

Every new question you ask, just seems to get creepier...

My feelings exactly !
Serkan, Are you planning to be Narue's secret stalker ? :S

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yeah! Use ad block plus (firefox addon) and block all the unwanted scripts/frames/images/ads/whatever! Life has been good since I started using ABP. :cool:

nav33n 472 Purple hazed! Team Colleague Featured Poster

>might as well be the geek lounge where the rep points wouldn't affect me
Perhaps I should slap you with a Keep It Pleasant infraction. You're not invincible here either, slick. ;)

Ah! Narue, welcome to the Children's club! :P

nav33n 472 Purple hazed! Team Colleague Featured Poster

What is the error ? I am still confused about what you want and what is the problem. Do you mean something like this ?

<?php
if(isset($_POST['submit'])) {
	$total = $_POST['field1']+$_POST['field2']+$_POST['field3']+$_POST['field4'];
	if($total % 4 == 0) {
		echo "$total Divisible by 4..";
	} else {
		echo "$total Not divisible by 4..";
	}
}
?>
<html>
<body>
	<form method='post' action='test.php'>
Field1:	<input type='text' name='field1'><br />
Field2:	<input type='text' name='field2'><br />
Field3:	<input type='text' name='field3'><br />
Field4:	<input type='text' name='field4'><br />
<input type='submit' name='submit' value='submit'>
	</form>
</body>
</html>

:-/ If this is not what you mean, you need to describe your question in detail with relevant code.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Umm.. In the above posted code, select box's name is list1 and list2. But, in the condition, you are trying to access mylist.

($_GET == 'm2' && $_GET =='m2') {

nav33n 472 Purple hazed! Team Colleague Featured Poster

Maybe it got to do with

$date		=	$date15_year.'-'.$date15_month.' '.$date15_date;

No. That is just fine. Use print_r($_POST); to see what is getting posted and what is not.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Can you post relevant code using tags ?[code=php] tags ?