PHP - Internet Explorer Problem
Hi,
as usual there is a problem ONLY with one browser... IE (any version). Please check the webpage & notice the space between the Header buttons. I can't find the PROBLEM!!! Please help!! Thanks in advance.. Similar TutorialsWell, my page contains a URL like file.php?userid=1&pass=passwordhashblablabla. I try to open the page on opera, mozilla, safari, google chrome and so browsers and it works fine. I get the message that id/pw match and user has logged in successfully. However, when I go to THE SAME url on IE, i get message that id/pw do not match. URL is still the same, history is cleaned... Thanks in advance. Hi All! First post here - I'm a bit of a self taught PHP junkie I'm having some issues with the following php/MySQL code. The issue is with Internet Explorer (surprise, surprise) I have setup an if statement so that the long description field in the form comes up as a text area (based on the max-length property of the mySQL field.), while the shorter fields come up as text fields. The issue is that in IE, none of the shorter fields preceding the Long Description Text Field show up - ie. the form is lacking a couple of necessary fields. Works perfectly well in Firefox. <form id="addprod" name="addprod" action="" method="get" enctype="multipart/form-data"> <?php require_once($_SERVER['DOCUMENT_ROOT'].'/resources/db/viewer_connect.php'); $table = 'products'; $fieldQuery = "SELECT * from $table"; $result = mysql_db_query($dbname,$fieldQuery) or die('<span class="body_text">Query Error: '.mysql_error().'</span>'); $i = 0; $prInfo = array('PROD_ID'=>'Product ID', 'PROD_NAME'=>'Product Name', 'PROD_DESC_SHORT'=>'Product Description (Short)', 'PROD_DESC_LONG'=>'Product Description (Long)', 'MODEL_1'=>'Model 1', 'MODEL_2'=>'Model 2', 'MODEL_3'=>'Model 3', 'MODEL_4'=>'Model 4', 'MODEL_5'=>'Model 5', 'RRP_1'=>'Model 1 RRP($)', 'RRP_2'=>'Model 2 RRP($)', 'RRP_3'=>'Model 3 RRP($)', 'RRP_4'=>'Model 4 RRP($)', 'RRP_5'=>'Model 5 RRP($)', 'PROD_IMG'=>'Main Image', 'IMAGE_2'=>'Image 2', 'IMAGE_3'=>'Image 3'); while ($i < mysql_num_fields($result)) { $meta = mysql_fetch_field($result, $i); if (!$meta) { echo "No information available<br />\n"; } if($meta->max_length<=256){ if($meta->name=='PROD_IMG'||$meta->name=='IMAGE_2'||$meta->name=='IMAGE_3'){ echo '<p class="body_text"><label for="'.$meta->name.'">'.$prInfo[$meta->name].':<input name="'.$meta->name.'" type="file" size="50" maxlength="'.$meta->max_length.'" /></label></p>'; } else{ echo '<p class="body_text"><label for="'.$meta->name.'">'.$prInfo[$meta->name].':<input name="'.$meta->name.'" type="text" size="50" maxlength="'.$meta->max_length.'" /></label></p>'; } } else{ echo '<p class="body_text" style="line-height:150px; vertical-align:top;"><label for="'.$meta->name.'">'.$prInfo[$meta->name].':<textarea name="'.$meta->name.'" cols="50" rows="10" /></p>'; } $i++; } mysql_free_result($result); ?> <p class="body_text"><input type="submit" value="Add New Record" /><input type="reset" value="Clear Form" /></p> </form> Any thoughts would be awesome!! Thanks in advance, Tim Hello... I'm working on a webpage (http://66.119.8.164/freedownloads.php) that pulls from an rss feed (http://www.moorelife.org/rss/FreeDownloads.xml). Please keep in mind that I'm working on content, not design. It's a very long page, currently. I want to have links on a sidebar that will allow sorting and filtering, based on <category>. I got the idea from, get this, Internet Explorer's built-in rss reader. It's great. I have a section of the page populating with SimpleXMLElement (that's where the case cover images and titles are). Above that is an alphabetic listing of all those entries populated by SimpleDOM's sortedXPath. Between those two are a few category links that use ajax to overwrite the section pulled with SimpleXMLElement. Now, I don't have any idea if I'm even doing this in an intelligent manner. As a matter of fact, I'm sure it's very far away from resourceful code. It's just what I have gotten to work when other options didn't work. Now, on to the problem. The code, below, is the php file (http://66.119.8.164/include/getrss.php) that ajax uses to overwrite the original list. Code: [Select] <?php //get the category from URL $category = $_GET["category"]; $xml = "http://www.moorelife.org/rss/FreeDownloads.xml"; $xmlDoc = new DOMDocument(); $xmlDoc->load($xml); $item = $xmlDoc->getElementsByTagName('item'); for ($i=0; $i<=5; $i++) { $item_title = $item->item($i)->getElementsByTagName('title')->item(0)->childNodes->item(0)->nodeValue; $item_category = $item->item($i)->getElementsByTagName('category')->item(0)->childNodes->item(0)->nodeValue; echo "<p>".$item_title."</p>"; echo "<p>".$item_category."</p>"; } ?> How do I only show the entries where $catagory match <category>? JJ Hi, I have a problem with Internet Explorer converting spaces into underscores: The problem occurs using PHPRtfLite. When I run the script I want the file name to contain spaces, however in Internet Explorer these spaces are converted into underscores. This does not happen in ff, chrome, safari or opera. Any help on how to fix this would be much appreciated as I am stuck. Thanks. Joe p.s. Here is how the file name is created $filename = "Mysite - ".$u-ID."' (".$user_name.").rtf"; This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=318213.0 Like many parents, I'm challenged with keeping my kids from browsing the evil parts of the internet. My son is 11 and my wife caught him deleting IE history the other day. The computer he uses is a Windows 8.1 laptop, and it is not Pro. How can i let him use internet explorer on his own user but keep him from tampering with any of the history ( or settings for that matter)? Is there a better solution? I found some internet history logging software online, but I didn't feel comfortable with the source, and fear it may contain viruses or other malware. Hello everyone, I'm new here first post, but there's a weirdness in code that i need to share, First of all, I know everyone who knows PHP/MYSQL will say the same thing... Server side code cannot be broken by a browser, especially by client side coding. I agree!!! That may be the case here too, but I have encountered one of the weirdest code ever and the client side code is causing an unexpected result in PHP/MYSQL, and only in Internet Explorer. Unexplainable, and I am seeking for an answer. After hours of trouble shooting I finally targeted the the trouble code... and it's CSS, and it's affecting a MYSQL line of code in PHP... #somediv { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=''); } ... anyways let me explain how the code should run and the problem... in one page a variable passed in the URL is being captured by PHP using the $_GET method, if that variable is empty PHP runs a code which updates a MYSQL database. That works fine, and as expected, except in INTERNET EXPLORER. On that same page, a css file which is to be included with the output html to the browser contains the above line of css too. Now in every other browser that code works as expected, if the variable is NOT empty, update the database and then output the html code. In IE the database gets updated no matter what, whether the variable is empty of not. Now the its only the mysql code inside the IF statement that get affected, because for troubleshooting purposes I have put echo statements inside the code, to catch the problem, and the echo statements work as should, just not the mysql update statement. Someone care to shed some light into this mystery? I have been banging my head for quite a number of hours on this.........I am getting the below error with firefox 7 or chrome but NOT with IE Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/unlockth/public_html/motorola/insertmoto.php on line 35 Here is the code.......pls can anyone help me? <?php $userip = ($_SERVER['X_FORWARDED_FOR']) ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $name = $_POST['name'] ; $email = $_POST['email'] ; $phone = $_POST['phone'] ; $operator = $_POST['operator'] ; $imei = $_POST['imei'] ; $todayis = date("l, F j, Y, g:i a") ; @mail( "xxx@xxx.com", "ORDER SUBMISSION", $message = " $userip $message = $todayis Name: $name Email: $email Phone Model: $phone Phone Operator: $operator Phone Imei: $imei", "From: MOTOROLA SUBMISSION>"); ?> <? $id = $_POST['id']; include "/home/unlockth/password.php"; mysql_select_db("unlockth_unlocking",$db); mysql_query("INSERT INTO custdetails VALUES ('','$name','$email','$phone','$operator','$imei')"); $insertid = mysql_insert_id(); include "/home/unlockth/password.php"; mysql_select_db("unlockth_unlocking",$db); $getdata = mysql_query("SELECT * FROM motorola WHERE id=$id", $db); $row = mysql_fetch_array($getdata); $title = $row["title"]; $price_1 = $row["price_1"]; $price_2 = $row["price_2"]; $price_3 = $row["price_3"]; $imageaddr = $row["imageaddr"]; $description = $row["description"]; $keywords = $row["keywords"]; $time = $row["time"]; include '/home/unlockth/public_html/motorola/outputmotocode.php';?> This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=346255.0 Well this is my first time using icecast and I am a little lost. I have these two (three in a way) files that are all linked in a way. index.php > cast_info.php > status.xsl so here are the files: index.php Code: [Select] <?php require_once("cast_info.php"); ?> <table> <tr> <th colspan="2">Stats For Icecast Server: <?php echo $radio_info['title']; ?></th> </tr> <?php foreach($radio_info as $title => $data) { switch($title) { case 'now_playing' : ?><tr> <td><b><?php echo $title; ?></b></td> <td><?php echo $data['artist']; ?><br /> <?php echo $data['track']; ?> </td> </tr><?php break; case 'title' : //skip break; default : ?><tr> <td><?php echo $title; ?></td> <td><?php echo $data; ?></td> </tr><?php break; } } ?> </table> cast_info.php Code: [Select] <?php /* * Script Configurations */ $SERVER = 'http://grimradio.com:8000'; //$SERVER = 'http://localhost:8000'; //enter the URL to your Icecast server $STATS_FILE = '/status.xsl'; //enter the path to your status.xsl file (leave blank unless u know its different) //////////////////////////////////// END OF CONFIGURATION ----- DO NOT EDIT BELOW THIS LINE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //get statistics file contents $fp = fopen($SERVER.$STATS_FILE,'r'); if(!$fp) { //error connecting to server! die("Unable to connect to Icecast server."); } $stats_file_contents = ''; while(!feof($fp)) { $stats_file_contents .= fread($fp,1024); } fclose($fp); //create array to store results for later usage $radio_info = array(); $radio_info['server'] = $SERVER; $radio_info['title'] = ''; $radio_info['description'] = ''; $radio_info['content_type'] = ''; $radio_info['mount_start'] = ''; $radio_info['bit_rate'] = ''; $radio_info['listeners'] = ''; $radio_info['most_listeners'] = ''; $radio_info['genre'] = ''; $radio_info['url'] = ''; $radio_info['now_playing'] = array(); $radio_info['now_playing']['artist'] = ''; $radio_info['now_playing']['track'] = ''; $temp = array(); //format results into array $search_for = "<td\s[^>]*class=\"streamdata\">(.*)<\/td>"; $search_td = array('<td class="streamdata">','</td>'); if(preg_match_all("/$search_for/siU",$stats_file_contents,$matches)) { foreach($matches[0] as $match) { $to_push = str_replace($search_td,'',$match); $to_push = trim($to_push); array_push($temp,$to_push); } } //build final array from temp array $radio_info['title'] = $temp[0]; $radio_info['description'] = $temp[1]; $radio_info['content_type'] = $temp[2]; $radio_info['mount_start'] = $temp[3]; $radio_info['bit_rate'] = $temp[4]; $radio_info['listeners'] = $temp[5]; $radio_info['most_listeners'] = $temp[6]; $radio_info['genre'] = $temp[7]; $radio_info['url'] = $temp[8]; //format now playing $now_playing = explode(" - ",$temp[9]); $radio_info['now_playing']['artist'] = $now_playing[0]; $radio_info['now_playing']['track'] = $now_playing[1]; ?> status.xsl Code: [Select] <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" > <xsl:output omit-xml-declaration="no" method="html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" /> <xsl:template match = "/icestats" > <html> <head> <title>Icecast Streaming Media Server</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"> <h2>Icecast2 Status</h2> <br /> <!--index header menu --> <div class="roundcont"> <div class="roundtop"> <img src="/corner_topleft.jpg" class="corner" style="display: none" /> </div> <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="4"> <tr> <td bgcolor="#656565"> <a class="nav" href="admin/">Administration</a> <a class="nav" href="status.xsl">Server Status</a> <a class="nav" href="server_version.xsl">Version</a></td> </tr> </table> <div class="roundbottom"> <img src="/corner_bottomleft.jpg" class="corner" style="display: none" /> </div> </div> <br /> <br /> <!--end index header menu --> <!--mount point stats--> <xsl:for-each select="source"> <xsl:choose> <xsl:when test="listeners"> <div class="roundcont"> <div class="roundtop"> <img src="/corner_topleft.jpg" class="corner" style="display: none" /> </div> <div class="newscontent"> <div class="streamheader"> <table cellspacing="0" cellpadding="0"> <colgroup align="left" /> <colgroup align="right" width="300" /> <tr> <td><h3>Mount Point <xsl:value-of select="@mount" /></h3></td> <xsl:choose> <xsl:when test="authenticator"> <td align="right"><a class="auth" href="/auth.xsl">Login</a></td> </xsl:when> <xsl:otherwise> <td align="right"> <a href="{@mount}.m3u">M3U</a> <a href="{@mount}.xspf">XSPF</a></td> </xsl:otherwise> </xsl:choose> </tr></table> </div> <table border="0" cellpadding="4"> <xsl:if test="server_name"> <tr><td>Stream Title:</td><td class="streamdata"> <xsl:value-of select="server_name" /></td></tr> </xsl:if> <xsl:if test="server_description"> <tr><td>Stream Description:</td><td class="streamdata"> <xsl:value-of select="server_description" /></td></tr> </xsl:if> <xsl:if test="server_type"> <tr><td>Content Type:</td><td class="streamdata"><xsl:value-of select="server_type" /></td></tr> </xsl:if> <xsl:if test="stream_start"> <tr><td>Mount started:</td><td class="streamdata"><xsl:value-of select="stream_start" /></td></tr> </xsl:if> <xsl:if test="bitrate"> <tr><td>Bitrate:</td><td class="streamdata"> <xsl:value-of select="bitrate" /></td></tr> </xsl:if> <xsl:if test="quality"> <tr><td>Quality:</td><td class="streamdata"> <xsl:value-of select="quality" /></td></tr> </xsl:if> <xsl:if test="video_quality"> <tr><td>Video Quality:</td><td class="streamdata"> <xsl:value-of select="video_quality" /></td></tr> </xsl:if> <xsl:if test="frame_size"> <tr><td>Framesize:</td><td class="streamdata"> <xsl:value-of select="frame_size" /></td></tr> </xsl:if> <xsl:if test="frame_rate"> <tr><td>Framerate:</td><td class="streamdata"> <xsl:value-of select="frame_rate" /></td></tr> </xsl:if> <xsl:if test="listeners"> <tr><td>Current Listeners:</td><td class="streamdata"> <xsl:value-of select="listeners" /></td></tr> </xsl:if> <xsl:if test="listener_peak"> <tr><td>Peak Listeners:</td><td class="streamdata"> <xsl:value-of select="listener_peak" /></td></tr> </xsl:if> <xsl:if test="genre"> <tr><td>Stream Gen </td><td class="streamdata"> <xsl:value-of select="genre" /></td></tr> </xsl:if> <xsl:if test="server_url"> <tr><td>Stream URL:</td><td class="streamdata"> <a target="_blank" href="{server_url}"><xsl:value-of select="server_url" /></a></td></tr> </xsl:if> <tr><td>Current Song:</td><td class="streamdata"> <xsl:if test="artist"><xsl:value-of select="artist" /> - </xsl:if><xsl:value-of select="title" /></td></tr> </table> </div> <div class="roundbottom"> <img src="/corner_bottomleft.jpg" class="corner" style="display: none" /> </div> </div> <br /> <br /> </xsl:when> <xsl:otherwise> <h3><xsl:value-of select="@mount" /> - Not Connected</h3> </xsl:otherwise> </xsl:choose> </xsl:for-each> <xsl:text disable-output-escaping="yes">&</xsl:text>nbsp; <div class="poster">Support icecast development at <a class="nav" target="_blank" href="http://www.icecast.org">www.icecast.org</a></div> </body> </html> </xsl:template> </xsl:stylesheet> now what the problem is, is that it won't display the "now playing" info. not sure exactly where the error might be, but I am sure it has to do with that array. you can view what does display here http://grimradio.com/ i want to get all the domain name on the internet and put them into a database. is there a way to get this. I've got: Quote /A/index.html /A/1/index.listing /A/2/index.listing /A/3/index.listing In index.html, I've got the following PHP code: Quote <?php $files = glob('./*/*.listing'); foreach ($files as $file) { include $file; } ?> As you can see, what PHP code does is include()'s all the index.listing files. I then create a clone of the A directory and alter the HTML in the .listing files so can tell the difference between A & B when they render: Quote /B/index.html /B/1/index.listing /B/2/index.listing /B/3/index.listing The issue I am having is "/B/index.html" is ()including the .listing files from the /A/*/ directory, when it should be including them from the /B/*/ directory. I can't understand why this is happening and hoping someone could shed some light on the issue? Hi, I'm pretty new to PHP and though i had scrambled enough info together to build my self a nice little login system with my limited knowledge and my websites need and it worked great in Firefox and safari. Then a few weeks latter (still rather pleased with myself!) I check it out in explorer and it wont login if i put in the correct user and password or show a the error message if these were wrong. I have supplied the code below. Can anyone help explain why it doesn't work in ie? thanks in advance for anyone that has a look for me, cheers, here is the code. <?php session_start(); define("USERNAME", "chris"); define("PASSWORD", "chrislaff"); if (isset( $_POST["login"])) { login(); } elseif (isset( $_GET["action"]) and $_GET["action"] == "logout") { logout(); } elseif (isset($_SESSION["username"])) { displayPage(); } else { displayLoginForm(); } ?> <?php function login() { if ( isset( $_POST["username"] ) and isset( $_POST["password"] ) ) { if ( $_POST["username"] == USERNAME and $_POST["password"] == PASSWORD ) { $_SESSION["username"] = USERNAME; session_write_close(); header("Location: index.php"); } else { displayLoginForm( "Sorry, that username/password could not be found. Please try again." ); } } } ?> <?php function logout() { unset( $_SESSION["username"] ); session_write_close(); header( "Location: index.php" ); } ?> <?php function displayPage() { displayPageHeader(); ?> <div id="wrapper"> <div id="articleadmin"> <table style="width:970px;" > <tr> <th colspan="2"> <span class="green18">Articles</span> <a href="add_article_form.php?action=add"> [ADD] </a> </th> </tr> </style> <?php //connect to slt_database $db = mysql_connect('localhost', 'root', '') or die ('Unable to connect. Check your connection parameters.'); mysql_select_db('chrislafferty', $db) or die(mysql_error($db)); ?> <?php $query = 'SELECT * FROM chris_content ORDER BY content_id DESC'; $result = mysql_query($query, $db) or die (mysql_error($db)); $odd = true; while ($row = mysql_fetch_assoc($result)) { echo ($odd == true) ? ' <tr class="odd_row"> ' : ' <tr class="even_row"> '; $odd = !$odd; echo ' <td style="width:75%;">'; echo "<span class=blue12>" . 'title: ' . "</span>" . "<span class=grey14>" . $row['title']. "</span>" . '<br/>' . "<span class=blue12>" . 'Date: ' . "</span>" . "<span class=grey14>" . $row['date']. "</span>" . '<br/>' . "<span class=blue12>" . 'Article Type: ' . "</span>" . "<span class=grey14>" . $row['content_type'] . "</span>" . '<p/>'; echo '</td> <td align="center">'; echo ' <a href="edit_article_form.php?content_id=' . $row['content_id'] . '" > EDIT </a> '; echo "<span class=green18>" . ' | ' . "</span>"; echo '<a href="delete_article.php?content_id=' . $row['content_id'] . '"> DELETE </a> '; echo '</td> </tr> '; } ?> </table > </div> <!--article admin div ends--> </div> <!-- div wrapper ends --> </body> </html> <?php } function displayLoginForm( $message="" ) { displayPageHeader(); ?> <div id="loginwrapper"> <?php if ( $message ) echo '<p>' ."<span class='green12'>". $message ."</span>". '</p>' ?> <form method="post" action="index.php"> <table> <tr> <td> <p> <span class="blue12">Enter your username</span> </td> <td> <input id="username" name="username" type="text"/> </p> </td> </tr> <tr> <td> <p> <span class="blue12">Enter your password</span> </td> <td> <input id="password" name="password" type="password"/> </p> </td> </tr> <tr> <td> </td> <td> <p> <input type="image" img src="../images/submit.gif" name="login" id="submit" value="login"/> </p> </td> </tr> </table> </form> </div> <!--div wrapper ends --> </body> </html> <?php } function displayPageHeader() { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>school magazine</title> <link rel="stylesheet" type="text/css" href="../styles.css"> <style type="text/css"> th { background-color: #FFFFFF;} .odd_row { background-color: #EAEAEA; } .even_row { background-color: #FFFFFF; } </style> </head> <body> <div id="logowrapper"> <div id="logo"><img src="../web_header.jpg" width="970" height="386"/></div> </div> <!--end of logo wrapper --> <div id="nav"> <div id="navwrapper"> <div id="navbutton1"><a href="../home.php">YOUR HOME</a></div> <div id="navbutton9"><a href="index.php?action=logout">LOGOUT</a></div> </div> <!-- end of navwrapper --> </div> <!-- end of nav div --> <?php } ?> I know about
<input type="file" >which allows one to upload files from one’s computer. But now I need a pop-up window that allows the user to choose first if he uploads from his computer or from the internet. How may I achieve that ? This question is perhaps better suited for the "Javascript" or even "AJAX" forum ; if someone advises me to, I will move that question and put it in the appropriate forum. Are there any codes or php scripts that will calculate the user's internet speed? This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=311833.0 Hello,
I have a secure login script that uses sessions to maintain a users logged in status. I regenerate the session ID on each page reload for added security. Sometimes, I will lose sessions, and I am hard time figuring out why. It seems to be when I have a slow internet connection. I am wondering what could be causing this?? I have a few ideas, do any of these seem plausible.
-A max execution error, returns a fatal error.
-An ajax request get sent before the previous request returns, so the session ID's dont match an I am kicked out.
Any other ideas would be helpful.
Best,
James
So, I have this web crawler that I want to use to index .onion websites through the TOR network. I amOk, here's what I need. I have a PHP based web crawler. It is accessible he http://rz7ocnxxu7ka6ncv.onion/ Now, my problem is that my spider that actually crawls pages needs to do so on a SOCKS port 9050. The thing is, I have to tunnel its connection through TOR so that It can resolve .onion domains, which is what I'm indexing. (Only ending in .onion.) I call this script from the command line using php crawl.php, and I add the appropriate parameters to crawl the page. Here is what I think: Is there any way to force it to use TOR? OR can i force my ENTIRE MACHINE to tunnel things through tor, and how? (Like forcing all traffic through 127.0.0.1:9050) perhaps if i set up global proxy settings, php would respect them? If any of my solutions work, how would I do it? (Step by step instructions please, I am a noob.) I just want to crate my own TOR search engine. (Don't recommend my p2p search engines- it's not what I want for this- I know they exist, I did my homework.) Here is the crawler source if you are interested to take a look at: Perhaps someone with a kind heart can modify it to use 127.0.0.1:9050 for all crawling requests? spider.php: http://pastebin.com/kscGJCc5 spiderfuncs.php: http://pastebin.com/m5y54RUh PLEASE someone help me! I am desperate. Hello, I made a website, with 3 lang on it, and site works fine (localhost) but when I upload it, default lang is EN and whenever I change lang on the web, let's say from EN to FR, page goes on that lang in this case on FR and redirect me on home page and all text on site is on FR, that's ok, but after that, when I try to click on let's say about us, then on it's own change it back to default lang, and show me that page (about us) but on default lang... Here is sample of code how it's look... This is select.php and I include_once this file on every page... <?php session_start(); header('Cache-control: private'); // IE 6 FIX if(isSet($_GET['lang'])) { $lang = $_GET['lang']; // register the session and set the cookie $_SESSION['lang'] = $lang; setcookie("lang", $lang, time() + (3600 * 24 * 30)); } else if(isSet($_SESSION['lang'])) { $lang = $_SESSION['lang']; } else if(isSet($_COOKIE['lang'])) { $lang = $_COOKIE['lang']; } else { $lang = 'en'; } switch ($lang) { case 'en': $lang_file = 'lang.en.php'; break; case 'fr': $lang_file = 'lang.fr.php'; break; case 'de': $lang_file = 'lang.de.php'; break; default: $lang_file = 'lang.en.php'; } include_once 'lang/'.$lang_file; This is lang.en.php... $lang = array(); // menu $lang['txt1'] = 'Home'; $lang['txt2'] = 'About Us'; $lang['txt3'] = 'Services'; $lang['txt4'] = 'Contact'; It's the same for other two languages... and I simply put in index.php this... <ul> <li><a href="index.php"><em><b><?php echo $lang['txt1'];?></b></em></a></li> <li><a href="about.php"><em><b><?php echo $lang['txt2'];?></b></em></a></li> <li><a href="services.php"><em><b><?php echo $lang['txt3'];?></b></em></a></li> <li><a href="contact.php"><em><b><?php echo $lang['txt4'];?></b></em></a></li> </ul> Let's say again, this kind of code works fine on localhost, but on web not... Any idea why? Thank you. Cheers. Hi guys, I need a help to find out what is a problem. Some of my code does not work on my local comp and in the same time it works well when I place it on Internet server. First example: Code: [Select] <body> <?php if($_POST['submit_form'] == "Submit") { $varNewTeam = $_POST['Reg_Team']; $varNewCity = $_POST['Reg_City']; $db = mysql_connect('localhost', 'root', '') or die ('no connection with server'); mysql_select_db('db_m ,$db) or die('DB error'); mysql_query ("INSERT INTO reg2012 VALUES ('$varNewTeam','$varNewCity')") or die('insert error'); } ?> <form action="registration_2012_form.php" method="post"> <p>Team: <input type="text" name="Reg_Team" size="20" maxlength="50" value="<?=$varNewTeam;?>" /><br /></p> <p>City: <input type="text" name="Reg_City" size="20" maxlength="50" value="<?=$varNewCity;?>" /><br /></p> <p><input type="Submit" value="Submit" name="submit_form" /></p> </form> </body> On local comp: It gives me message "Undefined index: submit_form". On Net server works well. If I split the code in two files. In the first one I leave the form with "action=FILE2.php" and put my php code in the second file "FILE2.php" - it starts work even on local server. second example: Code: [Select] <body> <?php $db = mysql_connect('localhost', 'root', '') or die ('no connection with server'); mysql_select_db('db_m' ,$db) or die('DB error'); mysql_query ("CREATE TABLE temp1 (team char(50), city char(50) )") or die('create tables error'); ?> </body> It works in the Net and can not create the TABLE on my local comp. I use XAMPP on my local comp (if it's important) |