Jump to content

Search the Community

Showing results for tags 'PHP'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 988 results

  1. Mudsaf

    [PHP, SQL Question]

    Im wondering is it possible to make 2x connections in 1 page whitout getting error from other connection. (Whitout disabling errors on PHP.ini also.) My code so far this. <?php$local = mysql_connect('localhost', 'root', 'PASSWORD);if (!$local) {} else {mysql_select_db("DATABASE"); }$server = mysql_connect("HOSTSERVER", "USER", "PASS");if (!$server) {} else {mysql_select_db("DATABASE");}?> So my point is i want to create php that first tries to connect localhost, if it gets error and cannot connect it tries to connect to "HOSTSERVER". (Whitout getting errors on "Localhost" connection.)
  2. I would like to offer to the visitors of my website the possibility for them to enter their email address in order to receive sometime a newsletter from my website.How to code the input form to get their email address?How to code the procedure to check the good validity of the email?How to code the storage in MySQL?How to code the procedure of sending an email to confirm the subscription and also to propose a link to unsubscribe?How to code to retrieve the email stored in the database when wishing to send a newsletter?And then, how to code the sending of this newsletter? I am ok with HTML/XHTML & CSS but I need help regarding how to handle PHP, MySQL and other things necessary to do the above project. Can someone help me? Thanks.H Olivier Dauxais.
  3. Hello, I am rather beginnner. HTML/XHTML and CSS is fine for me but I still have problem with PHP.Can someone tell me how to do in PHP a common menu for many different HTML pages?Thanks.H Olivier Dauxais.
  4. <?php$dbh = new PDO('mysql:host=localhost;dbname=mydata', 'root', '**********'); $tLat = $_GET['tLat'];$tLng = $_GET['tLng']; foreach($dbh->query('select name, lat, lng from locations') as $row) { $main_arr[] = $row;} echo json_encode($main_arr); ?> So I have some code above which I am working on. I am thinking about what is the best way to handle this. I suppose I could develop a simple solution that just adds and subtracts from "$tLat" and "$tLng" and then use a "where" clause in the query but I am looking for a better way. I know that there are GIS functions built into MySQL that perhaps could be used. My goal is to find all rows where lat and lng are a specified radius from "tLat,tLng". ? Thanks! P.S. I have already existing code for PHP that implements Haversine's that I could use but that would require each row to be processed individually. Is there not a way to handle the distance calculation within the query directly?
  5. hello every buddy, i want to show my search engines top 10 recent searches in my siteplz see my search enginewww.topmse.com it is php based search enginei want to show its recent searches by users in my site for getting its result pages indexed on google.plz somebuddy help me.i can create a database but i was not able to create a working script for this programe that is why i posting here. it is urgent plz help me. plz help me
  6. Hi guys, i have a bit of a PHP problem and would appreciate a bit of help. I am currently doing a project in college and it involves PHP, which i am a bit dodgy on. Basically we have to create a HTML page, with a drop box menu showing 5 music albums, and a Submit button. Here is what i have to show up the Deopdown menu in HTML: [/color]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">[/color]<html> <head><title>Album List</title></head> <form action="chosen_album.php" method="post"> <select name="albums"><option value="1">Appetite For Destruction</option><option value="2">Out Of Exile</option><option value="3">West Ryder Pauper Lunatic Asylum</option><option value="4">One By One</option><option value="5">Master Of Puppets</option> <p><input type="submit" name="submit" value="Submi" </p></select></form> </body></html> Now, when you pick an album name and hit submit, it should bring you to a page showing all the album info, track list, etc. (I have all this info from a previous project). But where im stuck is for the PHP code needed to link the HTML drop box page. This is my PHP code so far, but doesnt seem to work properly. I am using a Wamp server for my loclahost which is up and running ok, so dont think thats the problem: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head><title>Chosen Album</title></head> <?php$chosen_album = $_POST['albums'];$album_info = ''; if ($chosen_album== 1) {//appetite for destruction$album_info ='<p class="album_title">Appetite For Destruction</p><p class="artist">Artist: Guns N Roses</p><p class="track_list">Track List:</p><ol class="list"><li>Welcome to the jungle</li><li>Its so easy</li><li>Nightrain</li><li>Out ta get me</li><li>Mr Brownstone</li><li>Paradise city</li><li>My Michelle</li><li>Think about you</li><li>Sweet Child o mine</li><li>Youre crazy</li><li>Anything goes</li><li>Rocket queen</li> </ol> <iframe width="420" height="315" src="http://www.youtube.com/embed/i_gQOfF0Ymo" frameborder="0" ';}if($chosen_album==2) {//out of exile$album_info = '<p class="album_title">Out Of Exile</p><p class="artist">Artist: Audioslave</p><p class="track_list">Track List:</p><ol class="list"><li>Your Time Has Come</li><li>Out Of Exile</li><li>Be Yourself</li><li>Doesnt Remind Me</li><li>Drown Me Slowly</li><li>Heavens Dead</li><li>The Worm</li><li>Man Or Animal</li><li>Yesterday To Tomorrow</li><li>Dandelion</li><li>#1 Zero</li><li>The Curse</li><li>Like A Stone</li></ol><iframe width="420" height="315" src="http://www.youtube.com/embed/f_4MBuxMBN4" frameborder="0" allowfullscreen></iframe>';}if($chosen_album== 3) {//west ryder.......$album_info = '<p class="album_title">West Ryder Pauper Lunatic Asylum</p><p class="artist">Artist: Kasabian</p><p class="track_list">Track List:</p><ol class="list"><li>Underdog</li><li>Where Did All The Love Go?</li><li>Swarfiga</li><li>Fast Fuse</li><li>Take Aim</li><li>Thick As Thieves</li><li>West Ryder Silver Bullet</li><li>Vlad The Impaler</li><li>Ladies & Gentlemen (Roll The Dice)</li><li>Secret Alphabets</li><li>Fire</li><li>Happiness</li></ol><iframe width="560" height="315" src="http://www.youtube.com/embed/tjMnhiCUnr0" frameborder="0" allowfullscreen></iframe>';}?> (NOTE: I have only filled info for the first 3 items on the drop box to test it out)Basically, at the end i should have 1 HTML file (dropbox), 1 PHP file (album info) and 1 CSS file for styles (which im ok with.) Any help would be appreciated.
  7. HamelMesk

    Cake PHP

    Dear all, I hope seeing a tutorial for CakePHP, i found many tutorials but none of them has the wonderful learning method of W3schools.
  8. hey.. can anybody help me,.??.. I want make a program decision support system (DSS)using PHP with the method of Analytic Hierarchy Process (AHP) ,.. my have a problem how to put the AHP method to the PHP program.. pls help me
  9. Hi there, I have been looking up on how to use SOAP in relation to php and have managed to hit a bit of a snag with it. Basically on my server i get some information which is presented in xml format from sharepoint. I then wish to access this data from a php file on another server and print it out onto the screen. I have heard using a soap call is the best method for this. The problems i am having are as follows: Gaining authorisation to the xml file i which contains the soap contents i.e. how to log in with username and password Reading the soap content in php to capture some data and print it out Shown below is a copy of my data which is in an xml format: <xml><s:Schema id="RowsetSchema"><s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30"><s:AttributeType name="ows_DocIcon" rs:name="Type" rs:number="1"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_LinkFilename" rs:name="Name" rs:number="2"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_Created" rs:name="Created" rs:number="3"><s:datatype dt:type="datetime" dt:maxLength="8"/></s:AttributeType><s:AttributeType name="ows_Author" rs:name="Created By" rs:number="4"><s:datatype dt:type="string" dt:lookup="true" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_CheckoutUser" rs:name="Checked Out To" rs:number="5"><s:datatype dt:type="string" dt:lookup="true" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows__x007b_064b332a_x002d_4d9e_x002d_4e7e_x002d_8cf9_x002d_227b6c7972db_x007d_" rs:name="Learner Name" rs:number="6"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_StartDate" rs:name="Start Date" rs:number="7"><s:datatype dt:type="datetime" dt:maxLength="8"/></s:AttributeType><s:AttributeType name="ows_JobTitle" rs:name="Job Title" rs:number="8"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_Region" rs:name="Region" rs:number="9"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_Learner_x0020_Email" rs:name="Learner Email" rs:number="10"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType></s:ElementType></s:Schema><z:row ows_DocIcon="xml" ows_LinkFilename="learner_name.xml" ows_Created="2012-03-20 16:26:24" ows_Author="17;#**** *****" ows__x007b_064b332a_x002d_4d9e_x002d_4e7e_x002d_8cf9_x002d_227b6c7972db_x007d_="****** ******" ows_StartDate="2012-03-20 00:00:00" ows_JobTitle="Director" ows_Region="Durham" ows_Learner_x0020_Email="******@hotmail.co.uk"/></rs:data></xml> Ok so that is the code for one learner record which i am wanting to parse in php...all i want to know is, what do i do to get the learner e-mail address? (the one with the value xxxxx@hotmail.com from the page which requires authorisation to view it. So far i have tried the following with no luck (hashed out the main part of url as contains confidential material): <?php$xml = simplexml_load_file("http://*********.co.uk:8088/OPS/_vti_bin/owssvr.dll?Cmd=Display&List={6A2E72AB-8F77-4B94-A7FA-DB00527CEFB4}&XMLDATA=TRUE");echo $xml->AttributeType() . "<br />";foreach($xml->children() as $child){echo $child->AttributeType() . ": " . $child . "<br />";}?> I have also tried the following php code to display the learner name field (that is the name starting with ows__ with letters, underscores and numbers as shown below). it just says failed to load external entity which i am unsure about: <?php$client = new SoapClient("http://*********.co.uk:8088/OPS/_vti_bin/owssvr.dll?Cmd=Display&List={6A2E72AB-8F77-4B94-A7FA-DB00527CEFB4}&XMLDATA=TRUE", array(trace=>true, 'login'=>"*******", 'password'=>"*****"));$res = $client->row(array('ows__x007b_064b332a_x002d_4d9e_x002d_4e7e_x002d_8cf9_x002d_227b6c7972db_x007d_'=>5));print $res;?> As you can see i have hashed all of the confidential details out but if somebody could maybe correct my php code so that i can gain access to the file, parse an element from the xml and then display it on the screen then that would be great. Obviously i do have more records but only displayed the first one for demonstration purposes. I also have access to the request and response generated by the server if you wish to see them or maybe point me in the direction on how i can use them instead to print out the values in php. Many thanks, Mark
  10. I want to define http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js as $jquerylink in a variable, so that I can link them by just typing $jquerylink.
  11. Expectation of code: I would like it to take the number the customer selects and based on that number load a different page. So you load into index.php The options are 1 - 4. I am receiving the information into Variables. However, it's not changing the page. Here is the code for it to change the page. header('Location: driven' + $num + '.html');} Also is there a better way of breaking out of php code? <?phpif(isset($_POST['submit'])){echo "Submit button has been pressed"; ?><br /><?phpecho $num; ?><br /><?phpif ($num < 1){ $error="Invalid option"; echo $error;}else{ header('Location: driven' + $num + '.html');}}?> Notice all the <?php ?> ??
  12. Greetings, I am trying to write a small page where the user selects how many users. I want to use a drop down list. I believe I have everything in place. However, I can not get the submit information into my php script. Any thoughts? HTML / PHP code <?php$num=$_POST["num"];$errorif ($num < 1) $error="Invalid option";if ($num == 1) header('Location: driven1.html');if ($num == 2) header('Location: driven2.html');if ($num == 3) header('Location: driven3.html');else header('Location: driven4.html');?><!DOCTYPE HTML><html><head><link href="driven1.css" rel="stylesheet" type="text/css"/><title>Driven support request</title></head><body><?php echo $error ?><div class="body"><header class="header"><!--Accelera logo--><img src="AcceleraLogo.jpg" alt="Accelera Logo" /></header><div class="div1"><form method="get"> <fieldset class="user1"> <label>How many users?</label> <br /> <select name="num"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4+">4+</option> </select> <br /> <input type="submit" value="Submit" /> </fieldset></form></div></div></body></html>
  13. EDIT: i found out myself... just look away from this topic ..
  14. Good morning all. I am not new to website design/development but am new to this forum. I have an urgent matter which needs to be resolved by Friday 9th. I have a testimonial script which works fine. It takes data from a form inserts to a database and a second script displays the testimonials for users to see. My problem is it doesn't have a facility where by an administrator can approve testimonials, as a result I have had two scams which to remove you have to delete from the database it's self. May I have some suggestions on how to go about solving this problem? Kind regards Adam
  15. Hi I'm quite new to web design & development and I would like some information about Dreamweaver basicly and about web, because I'm a little bit confused, if its possible please. First, about form validation using the spry fields. What I mean is, lets say that I have a field in a form for Name and I want to prevent users entering in this field numbers or anything else, but only letters-characters. So can I edit the validate of the field using for example regular expressions (javascript and php) and if its possible where can I do that ?? Second, when I create a query in Dw through the bindings menu, I've noticed that besides the query it also generates and some other php code. So my question is, if I can delete this code and keep just the query in order to use it in a function for example, or doing this will have an affect on my code ?? And finally which is the best or more correct and efficient way to use in order to build pages quickly? 1st using templates and editable or optional regions that dreamweaver provides, or 2nd by using the "include" method of php (where the "common" stuff like header, nav manu etc put in a seperate file and then include them in pages of a site) ?? That's all for nowmany thanks
  16. For some reason my server does not have the system variable: <?=$_SERVER['PHP_SELF']?> My O.S. is Windows 7 and I am running PHP 5.3 over IIS7. Is my system not supposed to have that variable? In other words I have sample code using PHP_SELF that does not run on my setup for some reason. P.S. My phpinfo(); says that it does exist under system variables: _SERVER["PHP_SELF"]
  17. Hey guys, Trying to set up a blogging application using php and MySQL. Have the form set up to collect the information but simply isn't working when I launch it on the browser. Just want a simple way of storing the blog that the user enters into a DB that I have set up. Having trouble with it and is returning "unexpected T_VARIABLE" on line 34. Anyway hope someone can help. Thanks for the time Here's my code so far. <?php include ("top_part.php"); ?><?php include ("navi_part.php"); ?> <div id="content"> <?php // Check if form has been submitted and if blankif(isset($_POST['submit']) && !empty($_POST['Title']) && !empty($_POST['Author']) && !empty($_POST['Body'])){//storing the details entered into blog_ variables$blog_title = $_POST['Title'];$blog_body = $_POST['Body'];$blog_author = $_POST['Author'];$created = date ("Y-m-d H:i:s");$modified = date ("Y-m-d H:i:s"); // Database connection details$username = "mydb33836";$password = "mydb3383681";$server = "danu.it.nuigalway.ie";$database = "mydb33836"; //Connect to DBmysql_connect($server, $username, $password); //open the specific databasemysql_select_db($database) or die ("Unable to select database");s //blank first value leaves ID field empty. Therefore auto incriment can occur.$query = "INSERT INTO blogs VALUES ('', '$Title', '$Body', '$Author', '$created', '$modified')"; $result = mysql_query($query); //$recent_blogs = "SELECT id, title FROM blogs WHERE created = 0, 10 DESC"; // Close MySQL Connectionmysql_close(); // Echo response to userecho('<h2>Congrats</h2><p>You entered a Blog.</p>')}else { ?> <h2>The Blog</h2> <form name="blog" method="post" action=""> Title:<br><input type="varchar" size="30" name="Title"> <br><br> Blog:<br><textarea rows="20" cols="40" name="Body"></textarea> <br><br> Author:<br><input type="varchar" size="60" name="Author"> <br><br> <input type="submit" name="submit" value="Submit Blog"> </form> <?php } ?> </div> <?php include ("bottom_part.php"); ?> __________________________________________________________ Also here's a link to my mock website that i have been working on in class if thats any help. Thanks again, Damien.
  18. hi folks, need some help with this, iv got this code off a website, just the php part, iv put this code into a dynamic region of my site, as told to do, but when i then add it to a page style it doesnt show.now i know im probably missing a huge part of it but i dont even know what that is.and i still need to link eack option to a certain page of my site.any help i would be very grateful! <?phpfunction countrylist($action = 'dropdown', $selectedid = null) { $country_list = array( "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan",...and so on.... ); if ($action == 'dropdown') { foreach ($country_list as $country) { echo "<option value=\"".$country."\""; if (!empty($selectedid)) { if ($selectedid == $country) { echo " selected=\"selected\""; } } echo ">".$country."</option>\n"; } } elseif ($action == 'list') { foreach ($country_list as $country) { echo "<li>".$country."</li>\n"; } }}?>if possible id like to be able to add a secondary option field to narrow that searh results that show up on a search page, the idea is for this to search specific event pages..
  19. hi, i am trying to figure out how to take a php file iv downloaded and add it to my site, it was a zip file but its just confusing me now!does anyone know waht my first steps would be to do this, i am keen to learn all this stuff but i have to admit id be lost without the help of this forum.im just not sure how to take it from a zip file to installing it into my website files, if that is what i need to do?iv attached the file im tryin to use if this helps at all.pokerleague.zip
  20. sonu

    PHP Form

    Hello Guys,I am creating one simple php form all works great but I want solution for one thing.I want cc optional like I have checkbox in the form & if user click it then only it should send CC mail other wise not.Here is the code which I am using. <?php ob_start();$fromemail="No-Reply <demo@demo.com>"; // change here if you want$toemail="demo@demo.com"; // change here if you want$sub="Online Feedback"; // change here if you want$success_page_name="index.php";////// do not change in followingif($_SERVER['REQUEST_METHOD']=="POST"){$fieldnm_1=str_replace ( array("\n"), array("<br>"),trim($_REQUEST['fieldnm_1']));$fieldnm_2=str_replace ( array("\n"), array("<br>"),trim($_REQUEST['fieldnm_2'])); $contentmsg=stripslashes("<br><b><font style=color:#CC3300>$sub</font></b><br><table width=708 border=0 cellpadding=2 cellspacing=1 bgcolor=#CCCCCC><tr> <td width=165 align=right valign=top bgcolor=#FFFFFF><B>Name :</b> </td> <td width=565 align=left valign=top bgcolor=#FFFFFF>$fieldnm_1</td></tr><tr> <td width=165 align=right valign=top bgcolor=#FFFFFF><B>Email :</b> </td> <td width=565 align=left valign=top bgcolor=#FFFFFF>$fieldnm_2</td></tr></table>");////$headers = "MIME-Version: 1.0";$headers .= "Content-type: text/html; charset=iso-8859-1"; $from=$fromemail; $headers .= "From: ".$from."";$headers.= "Cc: ".$fieldnm_2.""; @mail($toemail,$sub,$contentmsg,$headers); header("Location:$success_page_name");}?> Thanks in Advance!
  21. I got this code for uploading videos to my youtubeaccount from my website (browserbased): <?php session_start(); set_time_limit(0); ini_set('memory_limit', '150M'); ini_set('upload_max_filesize', '30M'); ini_set('default_socket_timeout', '6000'); ini_set('max_input_time', '6000'); ini_set('post_max_size', '100M'); ini_set('max_execution_time', '6000'); $clientLibraryPath = 'library'; $oldPath = set_include_path(get_include_path() . PATH_SEPARATOR . $clientLibraryPath); //include Zend Gdata Libs require_once("Zend/Gdata/ClientLogin.php"); require_once("Zend/Gdata/HttpClient.php"); require_once("Zend/Gdata/YouTube.php"); require_once("Zend/Gdata/App/MediaFileSource.php"); require_once("Zend/Gdata/App/HttpException.php"); require_once('Zend/Uri/Http.php'); //yt account info $yt_user = 'xx'; //youtube username or gmail account $yt_pw = 'xx'; //account password $yt_source = 'xx'; //name of application (can be anything) //yt dev key $yt_api_key = 'xx'; //your youtube developer key //login in to YT $authenticationURL= 'https://www.google.com/youtube/accounts/ClientLogin'; $httpClient = Zend_Gdata_ClientLogin::getHttpClient( $username = $yt_user, $password = $yt_pw, $service = 'youtube', $client = null, $source = $yt_source, // a short string identifying your application $loginToken = null, $loginCaptcha = null, $authenticationURL); $yt = new Zend_Gdata_YouTube($httpClient, $yt_source, NULL, $yt_api_key); $myVideoEntry = new Zend_Gdata_YouTube_VideoEntry(); $myVideoEntry->setVideoTitle('The Movie');$myVideoEntry->setVideoDescription('My Test Movie');$myVideoEntry->setVideoCategory('Autos');$myVideoEntry->SetVideoTags('cars, funny'); $tokenHandlerUrl = 'http://gdata.youtube.com/action/GetUploadToken';$tokenArray = $yt->getFormUploadToken($myVideoEntry, $tokenHandlerUrl);$tokenValue = $tokenArray['token'];$postUrl = $tokenArray['url']; // place to redirect user after upload$nextUrl = 'http://sabinequardon.dk'; // build the form$form = '<form id="youtube_upload" action="'. $postUrl .'?nexturl='. $nextUrl . '" method="post" enctype="multipart/form-data" target="uploader">'. '<input id="title" name="video_title" type="text"/>'. '<input id="file_upload" name="file_upload" type="file"/>'. '<input name="token" type="hidden" value="'. $tokenValue .'"/>'. '<input value="Upload Video File" type="submit" id="submit" />'. '</form>'; echo $form; ?> I'm not really good at PHP, and it's the first time I'm trying to use the YouTube API. Been reading everything I could, just didn't seem to help much. I know it's something that I get the metadata first before uploading the video?I need the user to write their own title, so all the video's aren't named the same thing. Is there a way to do this? I've tried looking everywhere, just can't seem to find the right answer. Just annoying if all the videos the users are uploading are called the same. Thank you.
  22. My form is processed via action.php: <?phprequire_once 'login.php';$db_server = mysql_connect($db_hostname, $db_username, $db_password);if (!$db_server) die("Unable to connect to MySQL: " . mysql_error());$physichal_address = $_GET["physichaladdress"];$thelat = $_GET["thelat"];$thelng = $_GET["thelng"];$link = mysql_connect('localhost', 'root', '************');if (!$link) {die('Could not connect: ' . mysql_error());}mysql_close($link);?><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Free Wifi locations near you:</title><link type="text/css" href="style.css" rel="stylesheet" media="all" /><script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script><script type="text/javascript" src="map.js"></script></head><body><h1>Free Wifi locations near you:</h1><div id="map"></div><p>If you have any questions or comments please send them to the webmaster penguin@sepserver.net .</p></body></html> There is a referenced JavaScript in which I attempt to access PHP that fails: (function() {//function//window.onloadwindow.onload = function() {// Creating a reference to the mapDivvar mapDiv = document.getElementById('map');// Creating a latLng for the center of the mapvar latlng = new google.maps.LatLng(37.09, -95.71);// Creating an object literal containing the properties// we want to pass to the mapvar options = {center: latlng,zoom: 4,mapTypeId: google.maps.MapTypeId.ROADMAP};//window.onload// Creating the mapvar map = new google.maps.Map(mapDiv, options);google.maps.event.addListener(map, 'bounds_changed', function() {window.bounds = map.getBounds();<?php echo "alert(\"Hello World!\");" ?>});} })();//function Does anyone know why my call to PHP is breaking my JavaScript? I have done this before many times but I don't see why this is failing on my IIS7 + PHP configuration. "info.php" outputs just fine! Thank you so much!
  23. I want to use a php script so that when I access the page, the browser copy the file from server to another server. Say, a file is in www.google.com/file.exe and when I open the page, the file will be copied to www.myserver.com/download location. pls tell me indetails coz I know only a little about PHP.Thanks
  24. I have seen a lot of ways to determen if a PHP script is already running but I wonder which solution is the best.Currently I'm using this: <?php $run = basename($_SERVER['PHP_SELF'], '.php') . '.run'; if (!file_exists($run) { touch($run); } else { echo "Already running!"; exit; } // ... (rest of code)?> But I already have seen a lot examples using pid's & sid's and everything. I'm sure my solution is not the best at all and so I'm asking you all to discuss your solutions with me.
  25. birbal

    thread in php

    is there any way to implement thread in php? i came across pcntl but it is telling it is not for windows. how to do it with windows?
  • Create New...