cwarn23 387 Occupation: Genius Team Colleague Featured Poster

is there a concept like compressing php page in server and sending it to browser?

I'm not sure if anybody has thought of that before but that's a great idea for sending large amounts of html data to the user. I suppose you would use php to encode the data and javascript to decode the data. Never thought of that before.

Anyway, as for your other question for if internet speed is a factor. That is only true if the file size exceeds your internet speed. So for example, the most common internet speed is 25kbps which means that a file 25kb would take 1 second to load. In your case, if you download your php file and it turns out to be 200kb and you devide that by 8, if the answer of that sum = your internet speed then it would indeed be the speed of the connection making it slow. So below is the formula to calculate if it is your internet speed limiting the page load time.

x = internet speed in kb per second
y = time for page to load in seconds
z = size of page
if ((z/y)==x) {
internet speed is limiting the
page load time
} else {
you have sloppy/slow coding
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hai,
Thanks for your reply..Nicely answered...

Please correct if I am wrong in following points about "Geshi".
1)It does not work like normal editor where we can directly edit the file from GUI.
2)It doesnot check syntax and auto-complete feature...
3)I can't open a file of some format and edit it and save the same...

If above points are correct please suggest another editor developed in PHP which supports above points...

Just to let you know, that is entirely correct!

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Basically the way it works is that in the code I sent you during post #13, you would have seen the following line:

$geshi = new GeSHi($source, $language);

That is where you specify the source code in $source and the language file to use. So for example, just before that line could be the following:

$source='<?php echo "Hello world"; ?>';
$language='php';
$geshi = new GeSHi($source, $language);

Hope that is clearer.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

On your step2 - I think you saw the answer. The following code is meant to display on your page like you said it did but highlighted.

$foo = 45;
for ( $i = 1; $i < $foo; $i++ )
{
echo "$foo\n";
--$foo;
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The order I need is by Priority. I need it like this:

Leader
Singer
Piano
Synth
A-Guitar
E-Guitar
...

Won't that ONLY get it in ASC order for each column. See the last part of my post. It has a order or Priority.

Now I get ya. I don't think that is possible to do in mysql alone. You would need to convert the results into a giant array then sort the array into the order as pointed out in the above quotes. Then it would be possible to loop through the array results in order.

Or if that requires too much memory, you could use WHERE Instrument="Leader" and loop through those results and do the same for each type. Thats how I would do it.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try this:

<?php
$query = "select * FROM Ev_AvVolunteers  where id_Event='$id_Event' ORDER BY `Name`, `Instrument`";
$results = mysql_query($query) or die("Error performing query"); 
?>

or

<?php
$query = "select * FROM Ev_AvVolunteers  where id_Event='$id_Event' ORDER BY `Instrument`, `Name`";
$results = mysql_query($query) or die("Error performing query"); 
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It helps to read the documenation. Below is an example from the documenation

//
// Include the GeSHi library
//
include_once 'geshi.php';
 
//
// Define some source to highlight, a language to use
// and the path to the language files
//
 
$source = '$foo = 45;
for ( $i = 1; $i < $foo; $i++ )
{
  echo "$foo\n";
  --$foo;
}';
$language = 'php';
 
//
// Create a GeSHi object
//
 
$geshi = new GeSHi($source, $language);
 
//
// And echo the result!
//
echo $geshi->parse_code();

I would also strongly advise to read the related info at the following link: http://qbnz.com/highlighter/geshi-doc.html#basic-usage

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well from experience, if you have a database that is longer than 80 rows then that is when pagination will be needed. The only thing that is stopping it from loading faster is the cpu speed. Weather php is only using a proportion of your cpu or the job exceeds the cpu available, it is generally cpu that determines the time for a page to execute (and the rest eg. the right functions). Also just as a note to speed things up, instead of using mysql_fetch_array(), use mysql_fetch_assoc(). That should speed things up by about half a second.
I remember when I had a database with 21000 rows and 8 columns it took about a minute to load because pagination was needed.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

A common problem we all experience when a noob to displaying huge databases. This is where you need to use pagination. Try Googling "php pagination" as i've rarely used it myself and the above link contains an example.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It seems the main answer to all those problems it one of the things I'm good at - advanced algorithms. I find complex algorithms fun to make and in cases like this will make a great result like the algorithm that founded google. It's not like if there's anything hard about it. If worst comes to worst then I could just make the bot reword entire topics into a single mysql entries (eg 1 paragraph per mysql entry) and there would be no need for mass processing when searching the database. The problem is all about making the right algorithm and I'm sure I could do that. Just asking if anybody had any thoughts on how it should work.

Note that the reason for the cpu load is mainly because of the file_get_contents() function downloading files around 30Kb in size but using the sleep() function occasionally will help the cpu to some degree. Just in case your wondering, this bot will be hosted on a virtual private server with 512MB ram.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The other suggestions I had were for changing how daniweb works, if you didn't catch that. Not related to your question at all really. I just know that moderators ect. will be looking at it, so I thought I would throw it out there.

If you mean the url system, the url's that are being accessed are all on the rss feeds page or are on the page 2, 3, 4, 5 etc links. So for some reason the rss feeds don't link to the rewritten url (module_rewrite url). So that is why the links appear as they are. But if you mean something different then I would like to know as I can't see how else this script might change how daniweb works.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Good idea, but in practice I fear that it will be very difficult to make and have it work properly.

Why not just create a bot that uses premade solutions that can be trusted. It can analyze the words in the question (kind of like what you have) and post the appropriate solution.

The easier solution is to have more read me topics on common errors (which is the bulk of threads) and add some logic to make sure they have at least looked at them before being allowed to post their topic.

Another thing to think about is having a search function when they are posting their topic. They type out their problem and hit a search button (instead of 'submit new thread') and it brings up relevant threads. If they don't find a solution there, then the can post the thread to the forums. This would suppress a lot of the stupid questions that are posted on a daily basis.

I didn't exactly catch exactly what your suggesting. But the part that says brings up relevant threads is not exactly what I'm doing. What my database does is it contains many rows of sentences and on the users search, an AI will string together some of those sentences to form paragraphs. And at the moment I'm using a system of nouns and verbs. So if you could rephrase the information in the above quote in more simple terms because it's hard to see what your suggesting other than …

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have just completed a bot that indexes the pages linked from the rss feeds. Below is the script that I have created for the job and will alter it to scan 15 rss feeds. But does anybody know how often the rss feeds update? The minimum time gap in bot startup periods I could set this bot to would be about 1 hour due to monthly bandwidth. So please advise on what time intervals the bot should scan. Also you may be able to see in the code below the algorithm I have created. Are there any suggestions on how to improve the algorithm for later sentence retrieval?

Code is:

<?
set_time_limit (1800);
mysql_connect('localhost','root','');
mysql_select_db('botsearch');

function domain ($ddomain) {
return preg_replace('/^((http(s)?:\/\/)?([^\/]+))(.*)/','$1',$ddomain);
}

function url_exists($durl)
		{
		// Version 4.x supported
		$handle   = curl_init($durl);
		if (false === $handle)
			{
			return false;
			}
		curl_setopt($handle, CURLOPT_HEADER, true);
		curl_setopt($handle, CURLOPT_FAILONERROR, true);  // this works
		curl_setopt($handle, CURLOPT_HTTPHEADER, 
Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") );
		curl_setopt($handle, CURLOPT_NOBODY, true);
		curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
		$connectable = curl_exec($handle);
        //echo '"'.$connectable.'"';
		curl_close($handle);  
        $con=substr_replace($connectable,'',30);
        if (stripos($con,'200 OK') || stripos($con,'Moved')) {
            return true;
            } else {
            return false;
            }
		}


$in_valid_wordlist=array();
$r=mysql_query('SELECT * FROM `noun_list`');
while ($row=mysql_fetch_assoc($r)) {
    $in_wordlist[$row['word']]=true;
    }

function generate($url,$topicid) {
		global $f_data; //Data of file contents
        global $in_wordlist;

        $r=mysql_query('SELECT * FROM `faq_datareference` WHERE `id`="'.mysql_real_escape_string($topicid).'"');
        if (mysql_num_rows($r)==0) {
            //do something with webpage $f_data.
            //$tmp=htmlspecialchars_decode($f_data);
            $f_data=html_entity_decode($f_data);
            $f_data=str_replace('-|code|--|code|-','-|code|- -|code|-',$f_data);
            $f_data=preg_replace('#<blockquote[^>]+>(.*)</blockquote>#U','',$f_data);
            $tmp=str_replace(array('<br>','<br />'),"\r",$f_data);
            preg_match_all('#<div class="codecontent">(.*)</div>#iUm',$tmp,$code);
            $codeid=0;
            unset($tmp);
            $f_data=str_replace(array('<br/>','<br />'),'<br>',$f_data);
            $f_data=str_replace('<br><br>','<br>',$f_data);
            $f_data=str_replace('<br><br>','<br>',$f_data); //in case of 4 <br> in a …
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If you want another ip address in addition to your current ip address then I would suggest that you ask your internet service provider. But as for the free web hosts, google is your friend. I've always paid for my hosts that support php.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

So you want to make a search engine lol. There is a current topic about a simular thing at http://www.daniweb.com/forums/thread200918.html
It talks about the steps to making a bot controlled search engine and even has attached to it some sample scripts. But be aware that there are 2 types of search engines. Bot controlled search engines and database lookup search engines as I call them. The difference - bot controlled search engines have a bot that scan for the data while the other looks up the raw data from or original mysql source live on the search which isn't commonly used. Hope the above links helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I thought I would let you know that I have made a demo bot but for another website as attached to this post. Although it may need a few effiency changes it does the job. The attachment should also give you a better understanding of the sort of code structure I'm talking about as I have just written one possible algorithm.

--------
Edit:
I now see what you meen about the rss feeds. So are you saying to perhaps have a bot to only check to topics linked to in the rss feeds?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Although that's good advice Shawn and I will take note of that.
The only thing I would disagree with is the unset(). I have noticed in the past when reassigning string to variable in a loop a few million times the server runs out of memory where as if unset is used I have noticed the memory problem does not occur.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just checked the rss feeds on forum 17 and the rss feeds seems to be full of questions instead of answers. I was thinking more along the lines where the user could type a question like I did in post #1 or perhaps even send a link to their post and php would be able to string together answers from the database. And the database would be populated from bot scans. For now I'll find another site to scan as a demo while a decision is being made.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

@praghna
Is that a second topic you've posted praghna or is it an answer in the attachment. If you have posted an unrelated/different topic then please make a separate thread.

-----------
@varun_1411
As for the question posted by varun_1411, could you post around 20 words so that we can see what the problem is because all that we know is that you want to know something about "php uploading".

So before posting please read the rules. I hope the mods can help clear this one up.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Here's what i know..
Server side languages:
php (open source)
asp (ms)
asp.net (ms)

what i do not know is..

Ruby ??

Ajax ??

JSP ??

Dhtml??

And the title:
Rss, web services and SOAP (what soap u mean washing soap ???)


And which language is used to create a web application ??

Any help will be appreciated

as you can see im still a newbie in this stuff but im a fast learner !!!

So please if you have more info to add please do..

Your FINGERS will not regreted !

If you mean what languages do we recommend for a web developer then I would recommend the following as they have all been very useful for me.

  • Html/Dhtml
  • Javascript + Ajax
  • Java applets
  • php
  • css
  • xml

And I would suggest to start from the top of that list and work your way to the bottom. They each do a small thing but together bring great results.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Is the topic on the moderators lounge looking hopeful or haven't there been that many replies yet?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try making your mysql query line something like the following to see what error is reported.

$somevariable=mysql_query($query) or die(mysql_error());
if (mysql_num_rows($somevariable)==0) {
die ('There are no rows, thats the problem');
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try this.

$query= 'SELECT * FROM `'.mysql_real_escape_string($_GET[$tablename]).'` WHERE `id` = "'.mysql_real_escape_string($_GET[$row2[$cols]]).'"';
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If you don't want a repeated result then the following code should do the job.

<?php 
$code_records=array('');
//above line is only ever called once

function checkid() {
global $code_records;
$value = intval(rand(1, 100));
$sales_code='';
while (in_array($sales_code,$code_records)) {
$value = intval(rand(1, 100));
if ($value < 80)
{
$sales_code = 'VW';
} else if (($value > 79) && ($value <= 86)) {
$sales_code = 'DF';
} else if (($value > 86) && ($value <= 93)) {
$sales_code = 'RK';
} else if (($value > 93) && ($value <= 100)) {
$sales_code = 'DI';
}
if (!in_array($sales_code,$code_records)) {
    $code_records[]=$sales_code;
    break;
    }
}
return $sales_code.'<br>';
}

echo checkid();
echo checkid();
echo checkid();
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Can you guyshave a solution without using the rand function??

thanks you!

Do you mean this?

$value = 50; //input value
if ($value < 80)
{
$sales_code = 'VW';
} else if (($value > 79) && ($value <= 86)) {
$sales_code = 'DF';
} else if (($value > 86) && ($value <= 93)) {
$sales_code = 'RK';
} else if (($value > 93) && ($value <= 100)) {
$sales_code = 'DI';
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I was thinking of a new project for making a bot that scans daniweb for information and enters useful information into a database then people can ask the website questions and php+mysql will provide answers in paragraph form for the user to read. Is this ok on the legal side of things as I have written bots for my personal use before and have made a tutorial. Also if this is ok by the mods then any help with the algorithm would be appreciated.

kvprajapati commented: So nice that work. Simple yet elegant. +4
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The type of quotes you used are invalid. I've never seen double italic quotes like that before but the following should do the job.

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line
<p>
<?php
//before was: echo “This is a PHP line”;
echo "This is a PHP line"; //now is
phpinfo();
?>
</body></html>

Hope that helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It's just the php.ini settings. Place the following code at the top of each file with that error.

<?
error_reporting(E_ALL ^ E_NOTICE);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

One of the first php scripts I downloaded was a php voting poll called apoll. It can be downloaded through this page. Also it's been in beta for years so don't expect an upgrade. Hope it helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well if the problem is only in Internet Explorer (IE) I would say IE is the problem and not the script as IE doesn't read javascript properly and has it's bugs. But if you wish for your script to work with IE then I would suggest to check the javascript with the Microsoft version of the Javascript manual and also check that there are no obvious html errors. Or if you like you can post the code/download and I shall help you with the incompatability. That's Internet Explorer for you.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I would recomend
Dreamweaver
PHP Designer

From a professionals point of view, Dreamweaver causes too many compatibility problems. I have checked out PHP Designer and found that it contains so many unneeded features which can cause a misleading programming experience. Generally the IDE should only have a debugger when it a- compiles into binary or b- if there is no official debugger. And php has a pritty good debugger which means you may be given incorrect/inaccurate data by other debuggers. So for sure a IDE that just highlights syntax and has tabs is all that you need/want for best results. That is why I have chosen notepad++. If however you find php incredibly difficult then you may want to switch to something like PHP Designer. Would like to see what other comments there are on this post.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well this is what I would recommend:

  • Notepad++
  • XAMPP
  • A web browser

Most of the web development tools are included in XAMPP including Perl, CGI, PHP, Apache, MySql, Mail Server, Localhost Uploader. However I find that the mail server is a bugger to get up and running and the localhost uploader isn't really needed since you can just copy and past files into the c:/xampp/htdocs folder. Also when you are ready I can provide you with a few tweaks to enable .htaccess files and to enable curl.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Would the example here be of any use to you?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If your trying to place html code inside a textarea box then you will need to use Java (not Javascript). This is because it is impossible for html/javascript/css to display the links in the textarea as found in a google search however I have seen examples of it being done in Java though. That is why on every forum you see bbcode instead of dynamically formated text in the textarea field.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Thanks guys, one more question, does anybody know the Visual Basic Script version of what he typed up above?

Who typed what above? If your refering the the script I posted earlier that is a php script which just retrieves the file/url contents.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The only syntax highlighter I know of is Geshi which can be downloaded at http://sourceforge.net/project/showfiles.php?group_id=114997
Geshi I have used myself and can highlight text for a number of languages using php. However the html code it outputs can be a bit messy like most computer generated code. So try it out and see what you think of it.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If you just want the opposite result then the following should do the job.

<?
if (10+"NA" < 10+20) {
echo 'passed if';
} else {
echo 'failed if';
}
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well if that website that php re-enters the password in uses $_GET tags and not $_POST tags then you can simply use the file_get_contents() function to retieve the information. If however the external website uses $_POST tags then you will need to use curl.
So the basic usage of file_get_contents for communicating with an external website is as follows:

<?
$page=file_get_contents('http://www.example.com/page?user=cwarn23&pass=820578wxz56240358');
?>

Btw, that's a fake password. Hope the above example helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I tested the if statement you've suggested and no error occured so I don't see what the problem is. Below is an example of my script.

<?
if (10+"NA" > 10+20) {
echo 'passed if';
} else {
echo 'failed if';
}
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It was really buggy but I think I found all the bugs. Below is the corrected code.

<?php
//Display this page
$places = 700;
?>
<html>
<head><title>Fix this script</title>
<style type='text/css'>
<!--
table {
margin-left: 3em;
padding: 5;
}
td {
padding: .1in .25in .1in .25in;
}

h2,h3 {
font-weight: bold;
text-align: center;
}
-->
</style>
</head>
<body>
<?php
$event = 'Three Hundredth Annual World Magic Convention' ;
$schedule = array('Spells' => 1,'Potions' => 2,'Charms' => 3 );
define('DATE','January 15');

echo "<h2>\"style=\"color: red Announcing the $event\"</h2>";
echo '<h3>'.DATE.'</h3>';
echo '<p>This yearly conference—the premier education and networking forum for the magic community—is the place'; 
echo 'to learn about the most successful magic methodologies and to understand how to integrate new magic technologies into your current practices. </p>';

echo '<p>This year\'s conference offers the following educational events.</p>';

echo '<table border="1">
<tr><th>Time</th><th>Session</td></tr>';
foreach($schedule as $name => $time)
{
echo "<tr>
<td>$time</td>
<td>$name</td>
</tr>";
}
echo '</table>';
echo '<p style=\'margin-top: 2em\'>Witches and Warlocks! Hurry and sign up! Places are filling up fast. ';
echo '<h3>Only $places places left</h3>'; 
?>
</body>
</html>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Wierd those mysqli functions. Try converting your code to the mysql equivilents such as the following:

mysql_connect("localhost", "user", "pass") or
die("<p>Unable to connect to the database server</p>" . "<p>Error code ".mysql_error());
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well to add the 10 and NA you will need to convert NA to an integre/number. So the following should do the job:

$var1=str_replace('NA',0,$_GET['input1']);
$var2=str_replace('NA',0,$_GET['input2']);
$var3=str_replace('NA',0,$_GET['input3']);
$var4=str_replace('NA',0,$_GET['input4']);
if (($var1+$var2)>($var3+$var4)) {
//blah
}

However you may want to replace $_GET with whatever you already have in place.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If it is uploadphotos.php that the script is in and you want the photos to be in Gallery/photos then I think it would be one of the following:

../../Gallery/photos/
../../../Gallery/photos/

Hope that helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I received that error when calculating pi. As for the solution: There may be a line like the below in the php script.

ini_set('memory_limit','32M');

To solve that line simply change the number to how many megabites you want allocated to the memory. That is if the line exists somewhere in the script it can override the php.ini directives.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I'm just wondering if using mail() is the best way to go for this purpose or if I need to use something like phpmailer or other classes out there.

Well the mail() function is for sure one of the easiest ways to go unless you have a corrupted mail server. Have you tried placing the mail function inside an if statement to see if it passes all of the time. Perhaps your mail server is sometimes a bit busy and doesn't get a chance to process the message. I would suggest doing something like the following:

if (!mail($to,$title,$message)) {
if (!mail($to,$title,$message)) {
mysql_query('INSERT INTO `later_email_processing` SET `to`="'.
mysql_real_escape_string($to).'", `title`="'.
mysql_real_escape_string($title).'", `message`="'.
mysql_real_escape_string($message).'"') or die('Mail Storage error<br>'.mysql_error());
}
}

Then set a crone job so that once an hour all messages in the database are processed.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Then could you specify with html code in a code box what you would like the output to be?
I will guess what you want again. The following will just an underlined piece of text without a link.

<?php
for ($i =0; $i < $ValuenumtableChildren; $i++)
{
echo '<u>'.$Valuechild[$i].'</u><br>'."\n";
}
?>

and the following will do the same without the underline:

<?php
for ($i =0; $i < $ValuenumtableChildren; $i++)
{
echo $Valuechild[$i]."\n";
}
?>

Updated the code

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If that's all that the problem is then the following should do the job:

<?php
for ($i =0; $i < $ValuenumtableChildren; $i++)
{
echo '<a href="viewingdetails.php?name='.$Valuechild[$i].'">'.$Valuechild[$i].'</a>';
}
?>

If the above code doesn't displaying anything at all then try the code in my previous post.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi,
I get an error 500 when I try to open my web page with IE, but not with other Programs as Firefox or Safari. The problem I think is with the redirect in the index.php file, but I don't see the problem.
Here is the code:

<?
fcnX('home.php');

And the function is a Java script:

}
function fcnX($prUrl){
  echo '<script language="javascript">' . "\n";
  echo '<!--' . "\n";
  echo 'document.location = \'' . $prUrl . '\';' . "\n";
  echo '-->' . "\n";
  echo '</script>' . "\n";
  break;
  exit;
}

Any ideas?
Thks!

Well perhaps you may need to specify the full url in the function instead of just a page name. Below is an example of how you should use your function:

<?
fcnX('http://www.example.com/blogs/home.php');

You may find that IE is just getting confused without the full address.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

By any chance would the variable $ValuenumtableChildren = 0 or something like that. Also make sure that the array $valuechild[] actually exists. So try the below script if your not using mysql for the data.

<?php
if (empty($Valuechild) || !isset($Valuechild)) {
die('$Valuechild is not a valid variable. That is whats causing the problem.');
} 
foreach ($Valuechild AS $val) {
echo '<a href="viewingdetails.php?name='.$val.'>'.$val.'</a>';
}
?>

If you are using mysql and are displaying the results in a loop then the following would apply:

<?php
while ($row=mysql_fetch_array($sqlresult)) {
echo '<a href="viewingdetails.php?name='.$row[0].'>'.$row[0].'</a>';
}
?>

Hope that helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

any other suggestion?

Could you please post the lines around $Valuechild=array(); and check that it also uses the right casing because I can only see half the picture here.

tulipputih commented: thanks for your help..hope the problem could be solved..I have tried so many ways to make a link from that array variable +1