Search Results

Search found 45255 results on 1811 pages for 'php connect'.

Page 108/1811 | < Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >

  • PHP app.yaml, new to GAE, not sure of how to setup

    - by chetweewax
    I have a single page website built on bootstrap 3, that I am trying to move to Google Apps Engine. I Scaffold my sites using php, and all the content is showing but not the styles and javascript. My site is basically set up as follows _/js/bootstrap.js _/js/custom.js _/fonts/glypicon ...etc _/css/bootstrap.css _/css/custom.css _/php/ .. all my php files go here ... index.php can someone help me setup my app.yaml for this? I am new to GAE, and am a little confused by this.

    Read the article

  • Undefined index: email in C:\wamp\www\emailvalidate.php on line 4

    - by klari
    I am new to Ajax. In my Ajax I get the following error message : Notice: Undefined index: address in C:\wamp\www\test\sample.php on line 11 I googled but I didn't get a solution for my specified issue. Here is what I did. HTML Form with Ajax (test1.php) <!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>Untitled Document</title> <script> function loadXMLDoc() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("mydiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("POST","test2.php",true); xmlhttp.send(); } </script> </head> <body> <form id="form1" name="form1" method="post" action="sample.php"> <p> <label for="mail"></label> <input type="text" name="mail" id="mail" onblur="loadXMLDoc()" /> <input type="submit" name="submit" id="submit" value="Submit" /> </p> <p><div id = 'mydiv'></div></p> </form> </body> </html> test2.php <!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>Untitled Document</title> </head> <body> <?php echo "Your Address is ".$_POST['address']; ?> </body> </html> I am sure it is very simple issue but I don't know how to solve it. Any help ?

    Read the article

  • header problem in php refresh

    - by basma
    hello i have this code : <?php session_start(); echo "".$_SESSION['eventnum'].""; $urlRefresh = "testremot.php"; header("Refresh: 5; URL=\"" . $urlRefresh . "\""); ?> but the header doesnt work and this warning appear when i try to run this code : Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\remot\testremot.php:3) in C:\xampp\htdocs\remot\testremot.php on line 5 can you please help me ?

    Read the article

  • Gmail,Yahoo, Facebook, Twitter contacts importer in PHP

    - by Arjun
    Which is the greatest, cheapest application in PHP that I can buy to import Gmail, Yahoo, MSN, Facebook, Twitter contacts from my user's accounts if they wish to invite their friends? I have gone through: http://www.improsys.com/importer.htm http://www.octazen.com/demo.php and http://www.iplussoft.com/product/iplusinvite_pricing Octazen looks awesome but wants excess of $320 for an all in solution. I don't want to spend that much. All you PHP programmers out there you may have needed to build of integrate a similar app, I need to know which is the best PHP readymade app for this? Any help would be appreciated and I'll smile with each answer - this should be your biggest incentive to find me something amazing :)

    Read the article

  • where is wrong in my php code ????

    - by user318068
    hi all, <td align="center" bgcolor="#FFFFFF"><?php echo '<label onclick="window.open('profilephp.php?member=$row['MemberID']','mywindow')">'.{$row['MemberName']}.'</label>';?><br /> <?php echo "<p align='center'><img width='100' height='100' src={$row['MemberImg']} alt='' /></p>";?></td></tr> Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\home - Copy\membercopy.php on line 141 I really don't know where it went wrong. Please help,

    Read the article

  • undefined offset error in php

    - by user225269
    I don't know why but the code below is working when I have a different query: $result = mysql_query("SELECT * FROM student WHERE IDNO='".$_GET['id']."'") ?> <?php while ( $row = mysql_fetch_array($result) ) { ?> <?php list($year,$month,$day)=explode("-", $row['BIRTHDAY']); ?> <tr> <td width="30" height="35"><font size="2">Month:</td> <td width="30"><input name="mm" type="text" id="mm" onkeypress="return handleEnter(this, event)" value="<?php echo $month;?>"> <td width="30" height="35"><font size="2">Day:</td> <td width="30"><input name="dd" type="text" id="dd" maxlength="25" onkeypress="return handleEnter(this, event)" value="<?php echo $day;?>"> <td width="30" height="35"><font size="2">Year:</td> <td width="30"><input name="yyyy" type="text" id="yyyy" maxlength="25" onkeypress="return handleEnter(this, event)" value="<?php echo $year;?>"> And it works when this is my query: $idnum = mysql_real_escape_string($_POST['idnum']); mysql_select_db("school", $con); $result = mysql_query("SELECT * FROM student WHERE IDNO='$idnum'"); Please help, why do I get the undefined offset error when I use this query: $result = mysql_query("SELECT * FROM student WHERE IDNO='".$_GET['id']."'") I assume that the query is the problem because its the only thing that's different between the two.

    Read the article

  • php regular expression assistance bold a filename

    - by jason
    I am not very good, with regular expression in php I am trying to get a reg_expression to find all file names such as /file-name-here.php and make it bold. This expression works in Flash but not in php it also doesn't accept the '-' i'm not sure why i can't get it to work with preg_replace /(https?://)?(www\.)?([a-zA-Z0-9_%]*)\b\.[a-z]{2,4}(\.[a-z]{2})?((/[a-zA-Z0-9_%]*)+)?(\.[a-z]*)?/g

    Read the article

  • PHP cannot verify if directory exists

    - by ali
    I am going crazy with this one I have this folders and files structure / /projects /mytest /install /index.php /product /resources So, inside my install/index.php file I am trying to verify if /product folder does exist. I know that the folder exists, but looks like PHP doesn't. My code: if(file_exists('../../mytest/product') && is_dir('../../mytest/product')) { echo 'Folder exists!'; } else { echo 'PHP is blind or something!'; } Maybe I am very tired, but I just cannot figure out what is wrong. Some rested minds here maybe will see the problem. Thanks!

    Read the article

  • Php + mysql transactions examples

    - by Donator
    I really haven't found normal example of php file where mysql transactions are being used. Can you show me simple example of that? And one more question. I've already created a lot of programming and didn't use transaction, maybe I can put any php function or smth to header.php that if one mysql_query fails, then others too? Thank you.

    Read the article

  • PHP Ajax not working

    - by Kostis
    I have 3 buttons on my page and depending on which one the user is clickingi want to run through ajax call a delete query in my database. When the user clicks on a button the javascript function seems to work but it doesn't run the query in php script. The html page: <?php session_start(); ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7"> <script> function myFunction(name) { var r=confirm("Are you sure? This action cannot be undone!"); if (r==true) { alert(name); // check if is getting in if statement and confirm the parameter's value var xmlhttp; if (str.length==0) { document.getElementById("clearMessage").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("clearMessage").innerHTML= responseText; } } xmlhttp.open("GET","clearDatabase.php?q="+name,true); xmlhttp.send(); } else alert('pff'); } </script> </head> <body> <div id="wrapper"> <div id="header"></div> <div id="main"> <?php if (session_is_registered("username")){ ?> <!--<a href="#">???a????s? pa?a??? µ???µ?t??</a><br /> <a href="#">???a????s? pa?a??? s??ed????</a><br /> <a href="#">???a????s? push notifications</a><br />--> <input type="button" value="???a????s? pa?a??? µ???µ?t??" onclick="myFunction('messages')" /> <input type="button" value="???a????s? pa?a??? s??ed????" onclick="myFunction('conferences')" /> <input type="button" value="???a????s? push notifications" onclick="myFunction('notifications')" /> <div id="clearMessage"></div> <?php } else echo "Login first."; ?> </div> <div id="footer"></div> </div> </body> </html> and the php script: <?php if (isset($_GET["q"])) $q=$_GET["q"]; $host = "localhost"; $database = "dbname"; $user = "dbuser"; $pass = "dbpass"; $con = mysql_connect($host,$user,$pass) or die(mysql_error()); mysql_select_db($database,$con) or die(mysql_error()); if ($q=="messages") $query = "DELETE FROM push_message WHERE time_sent IS NOT NULL"; else if ($q=="conferences") $query = "DELETE FROM push_message WHERE time_sent IS NOT NULL"; else if ($q=="notifications") { $query = "DELETE FROM push_friend WHERE time_sent IS NOT NULL"; } $res = mysql_query($query,$con) or die(mysql_error()); if ($res) echo "success"; else echo "failed"; mysql_close($con); ?>

    Read the article

  • how to return value through php function when called through the anchor tag in html

    - by sumit
    Look at my code below <a href="https://secure.gate2shop.com/ppp/purchase.do?merchant_id=234555454545433&merchant_site_id=54443¤cy=USD&total_amount=39.99&item_name_1=IncidentSupportTier1&item_amount_1=39.99&item_quantity_1=1&checksum=**call php function to get the checksum value**&time_stamp=2010-06-14.14:34:33&version=3.0.0" onmouseover="document.myform.sub_but.src='checkout02.jpg'" onmouseout="document.myform.sub_but.src='butup.gif'" onclick="return val_form_this_page()"> <img src="http://www.techvedic.com/gifs/checkout02.jpg" width="143" height="39" border="0" alt="Submit this form" name="sub_but" /> On button click the href link will open. But before opening the link I need to calculate the cheksum. I know how to calculate it in PHP script. But please tell me how can I call the PHP function which will return the checksum value. Don’t worry about the code in PHP script.

    Read the article

  • Connection: Keep-Alive and PHP sessions not working

    - by user366667
    We have a VB application that needs to run an specific flow on a PHP page. This application was correctly catching the PHPSESSID cookie and using it for all subsequent requests. However, PHP wasn't able to restore any changes made on $_SESSION variable. The variable was changed, saved, and on the next request it was restored as an empty array. We found out that changing the Connection header from "Keep-Alive" to "Close" fixed the issue. I couldn't find anything on the web saying that PHP sessions shouldn't be restored under Keep-Alive connections. Does anyone know why this was happening? PS: We didn't find anything weird or different on Apache, ModSecurity or PHP configuration settings.

    Read the article

  • Write to the second line of a PHP file

    - by Woz
    I have a php file that I want to add an include path to on the second line. I need to open the file and inset a line of code on line 2. I have tried a few techniques none of which are working but I think it has something to do with the text I am trying to write and possibly not escaping character correctly as I am not too familiar with file writing. So here is the file I want to write to: $file = $_SERVER['DOCUMENT_ROOT'].'/'.$domaindir.'/test.php'; Here is the piece of text I want to insert into the file: $dbfile = "include('".$_SERVER['DOCUMENT_ROOT']."/".$domaindir."/web_".$dbname.".inc.php');"; Then what I was doing was a string replace but all it did was bump the "session_start();" bit to a newline! Can anyone point me in the direction of a tutorial that might tell me how to insert this into the second line of my php file or indeed if anyone has any ideas? I can say for sure that the path to the PHP file is fully tested so i know its not that the file is not being open or written to. Any ideas would be much appreciated. Thanks in advance.

    Read the article

  • Absolute URL Path for PHP Website

    - by kakaajee
    Hi friends, I am working on a website in a CMS site. I have provided a link in my footer file e.g blogs.php. This page is at the root like "http://www.example.com/new_cms/blogs.php" When I moves to other files link like "http://www.example.com/new_cms/forums" the footer link is changed to "http://www.example.com/new_cms/forums/blogs.php" but the blogs.php page resides at path "http://www.example.com/new_cms/" . I tried different $_SERVER[] variables but got no luck to get the above path "http://www.example.com/new_cms/" means the server name with the directory where the project is currently running from. Any one have idea how to get it done will be a great help. Thanks

    Read the article

  • Passing $_GET or $_POST data to PHP script that is run with wget

    - by Matt
    Hello, I have the following line of PHP code which works great: exec( 'wget http://www.mydomain.com/u1.php /dev/null &' ); u1.php acts to do various types of maintenance on my server and the above command makes it happen in the background. No problems there. But I need to pass variable data to u1.php before it's executed. I'd like to pass POST data preferably, but could accommodate GET or SESSION data if POST isn't an option. Basically the type of data being passed is user-specific and will vary depending on who is logged in to the site and triggering the above code. I've tried adding the GET data to the end of the URL and that didn't work. So how else might I be able to send the data to u1.php? POST data preferred, SESSION data would work as well (but I tried this and it didn't pick up the logged in user's session data). GET would be a last resort. Thanks!

    Read the article

  • Creating a session user login php

    - by user2419393
    I'm stuck on how to create a session for a user who logs in. I got the part of checking to make sure the log in information corresponds with the database information, but is stuck on how to take the email address and store into a session. Here is my php code below. <?php include '../View/header.php'; session_start(); require('../model/database.php'); $email = $_POST['username']; $password = $_POST['password']; $sql = "SELECT emailAddress FROM customers WHERE emailAddress ='$email' AND password = '$password'"; $result = mysql_query($sql, $db); if (!$result) { echo "DB Error, could not query the database\n"; echo 'MySQL Error: ' . mysql_error(); exit; } while ($row = mysql_fetch_assoc($result)) { echo $row['emailAddress']; } mysql_free_result($result); ?>

    Read the article

  • Having trouble with php and ajax search function

    - by Andy
    I am still quite new to php/ajax/mysql. In anycase, I'm creating a search function which is returning properly the data I'm looking for. In brief, I have a mysql database set up. A php website that has a search function. I'm now trying to add a link to a mysql database search rather than just showing the results. In my search.php, the echo line is working fine but the $string .= is not returning anything. I'm just trying to get the same as the echo but with the link to the mysql php record. Am I missing something simple? //echo $query; $result = mysqli_query($link, $query); $string = ''; if($result) { if(mysqli_affected_rows($link)!=0) { while($row = mysqli_fetch_array($result,MYSQLI_ASSOC)) { echo '<p> <b>'.$row['title'].'</b> '.$row['post_ID'].'</p>'; $string .= "<p><a href='set-detail.php?recordID=".$row->post_ID."'>".$row->title."</a></p>"; } } else { echo 'No Results for :"'.$_GET['keyword'].'"'; }

    Read the article

  • PHP+MYSQL Server Config

    - by Matias
    Hi guys, I am parsing an XML file with PHP and inserting the rows in a MYSQL database. I am using PHP simplexml_load_files to load the XML and a foreach to loop through the array and insert the rows into my database. It works perfectly fine with small files i am testing, but it comes to reality I need to parse a large 500mb XML file and nothing happens. I was wondering what was the right Php.ini config for this case ? I have a VPS Linux Cent OS, with 256 mb of dedicated Memory and MYSQL 5.0.5. I have also set php memory_limit = 256M (maximum of my server) Any suggestions, similar experiences will be greatly appreciated Thanks

    Read the article

  • mysql php problem: no error message despite error_reporting(E_ALL) line

    - by herrturtur
    index.php <html> <head> <title>Josh's Online Playground</title> </head> <body> <form method="POST" action="action.php"> <table> <tr> <td>"data for stuff"</td> <td><input type="text" ?></td> </tr> <tr> <td><input type="submit"></td> </tr> </table> </form> </body> </html> action.php <?php error_reporting(E_ALL); ini_sit("display_errors", 1); $mysqli = new mysqli('localhost', 'root', 'password', 'website'); $result = $mysqli->query("insert into stuff (data) values (' .$_POST['data'] ."'); echo $mysqli->error(); if($result = $mysqli->query("select data from stuff")){ echo 'There are '.$result->num_rows.' results.'; } while ($row = $result->fetch_object()){ echo 'stuff' . $row->data; } ?> Despite the first two lines in action.php, I get no error or warning messages. Instead I get a blank page after clicking the submit button. Do I have to do something differently to insert data?

    Read the article

  • Rails-like console for PHP?

    - by Chad Johnson
    Every so often, things work in my local PHP development environment, while in my test environment on my server, things do not. It's a nightmare to debug this. If I had a console like Rails provides, debugging would be much much simpler. Is there anything like the Rails console but for PHP? I should mention that I am using a home-brewn PHP application.

    Read the article

  • html embeded php code not executing when hosted on iis

    - by Jack
    <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <TITLE></TITLE> </HEAD> <BODY> <?php echo '<p>Hello World</p>'; ?> </BODY> When I run the above code in browser, firefox render it like this Hello World '; ? I am doing my coding in Windows XP/IIS 5.1. I have PHP setup correctly because i have no problem running .php file. The problem seem to me that IIS can't render php code embedded inside html. Does anyone know how to fix this problem or should i switch to Apache?

    Read the article

  • Debugging PHP in Aptana 2.0

    - by Nick Lowman
    I'm a real newbie when it comes to PHP debugging so forgive my stupidity. I have a simple html form that submits to a PHP script and I want to debug that script and see what's being sent from the form. My Aptana has two two PHP interpreters installed; Zend Debugger on port 10001 and XDebug on 9000 I have the Firefox Aptana Addon installed I have my HTML page on the following url, running locally; http://3i/latest.html In the IDE I open the PHP script and add some breakpoints, I then open the latest.html and I click on the debug button. It launches the HTML page in a local webserver running at; http://127.0.0.1:8000/3i/latest.html I then fill out the form and submit at which point the debugger tells me the JS Debugger has terminated but it doesn't stop at my break points. I've had a good read around and I can't find anything which helps me, which makes me think it's something pretty easy and I'm being a bit dumb.

    Read the article

< Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >