Assuming there are 5 inputs in web form
<input name='the_same[]' value='different' />
<input name='the_same[]' value='different' />
<input name='the_same[]' value='different' />
<input name='the_same[]' value='different' />
<input name='the_same[]' value='different' />
When server side receive the post data, i use a foreach to accept ...
I am attempting to use cURL to connect to a page like this: https://clients.mindbodyonline.com/asp/home.asp?studioid=851 with the following code;
<?php
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'https://clients.mindbodyonline.com/asp/home.asp?studioid=851');
//curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
cur...
This is what I have at the moment.
<h2>Information</h2>\n +<p>(.*)<br />|</p>
^ that is a tab space, didn't know if there was
a better way to represent one or more (it seems to work)
Im trying to match the 'bla bla.' text, but my current regex doesn't quite work, it will match most of the line, but I want it to mat...
When i'm trying to put russian text in cookie via javascript and then output it via php it returns:
%u043F%u0440%u043E%u0432%u0435%u0440%u043A%u0430
How to decode this to normal cyrillic characters?
This is the function i'm using to pass to document.cookie:
function setCookie(c_name,val,c_expiredays,c_path,c_domain,c_secure)
{
v...
On this site - LINK - i need to use 3 banner scrollers (2x vertical + 1x horizontal). I've tried to do it in flash, but then everyone web browsers shut down, or suspended. Now i want to do it in JS (i use mootools). All data come from MySQL. Here's the complete code (even if you don't know mootools, You should understand it)
global $wpd...
I'm going to be starting a fairly large PHP application this summer, on which I'll be the sole developer (so I don't have any coding conventions to conform to aside from my own).
PHP 5.3 is a decent language IMO, despite the stupid namespace token. But one thing that has always bothered me about it is the standard library and its lack o...
I am getting this error :
ERRNO: 2
TEXT: Division by zero
LOCATION: C:\xampp\htdocs\final\classes\customer.php, line 183, at April 2, 2010, 3:49 pm
I have the following function in my class Customer
public static function GetQuotationDetails($string)
{
$sql = 'SELECT I.name, I.discounted_price, I.other_name
...
Hi,
I am using PHP socket programming and able to write data to open socket but i have to wait for a long time(or stuck it)for the response or some time getting error like "Maximum execution time of 30 seconds exceeded line number where this code is placed fgets($fp, 128), i have check the server it seems it has sent the response as exp...
Hi everyone. I'm a long running fan of stackoverflow, first time poster. I'd love to see if someone can help me with this. Let me dig in with a little code, then I'll explain my problem. I have the following wrapper classes:
class mysqli_wrapper
{
private static $mysqli_obj;
function __construct() // Recycles the mysqli object
...
I want to show terms and condition note on my website. I dont want to use text field and also dont want to use my whole page. I just want to display my text in selected area and want to use only vertical scroll-bar to go down and read all text.
Currently I am using this code:
<div style="width:10;height:10;overflow:scroll" >
text text...
Im trying to write a function for adding category:
function addCategory() {
$cname = mysql_fix_string($_POST['cname']);
$kabst = mysql_fix_string($_POST['kabst']);
$kselect = $_POST['kselect'];
$kradio = $_POST['kradio'];
$ksubmit = $_POST['ksubmit'];
$id = $_POST['id'];
if($ksubmit){
$query = "INSERT INTO category VALUE...
Hi there,
I'm trying to use the PHP exec() or system() (or any other similar function) to run a batch file, but I can't seem to get these to return anything.
The simplest example I've seen is this, which outputs nothing:
<?php
echo system('dir');
?>
The script is running on a windows XP machine on IIS with PHP installed and I've...
I have a problem logging onto a page and then using it with cURL.
I login, get PHPSESSID and cookie, and then try to do an action but page returns 'not logged in'.
But if I manually log in and copy/paste that PHPSESSID into curl cookies .txt file, everything works fine. So why doesn't it work with PHPSESSID from cURL?
EDIT:
It also work...
I am using FaceBook application inside iframe. But when I try to access it using url like
http://apps.facebook.com/myapp, it immediately redirects me to my lhttp://localhost:8080 application, which I intended to keep in frame.
I assume that my local application should stay in frame, while the general container would be FB site itself, ...
Hello everyone,
Im looking for a simple bit of code that will let me add the following html into my zend form:
<div id="wmd-button-bar" class="wmd-panel"></div>
Thats it, it needs to be above my 'method' element in the form but thats it. For such a simple action I cant find any methods that don't involve me learning rocket science (i....
hi All,
a funny problem. I send mail via PHP from my testing server with Chinese chars in it and it sends perfectly. Encoding is utf-8. When I upload the same PHP file to another server and try to send from there, the e-mail will look 90% fine in one mail client (web-based mail actually, gmail), but in my mail client (Apple Mail) it's a...
Office is running in Wine, meaning I have a running Version (2003).
But when I try to create a new COM object I just get the following error:
Fatal error: Class 'COM' not found
<?php
$com = new COM('Word.Application');
$com->close();
Is there a way to get this working without installing Windows?
...
Hi,
Following on from my earlier question, I am still having issues with loading the xml file into Zend_Navigation.
I am now getting the following error message:
<b>Fatal error</b>: Uncaught exception 'Zend_Navigation_Exception' with message 'Invalid argument: Unable to determine class to instantiate' in C:\www\mysite\development\w...
Hi guys,
I have this code in PHP. It connects to the DB fine, but pops an error, when tryinto to insert the info.
$dbc = mysqli_connect('localhost', 'root', 'marina', 'aliendatabase') or die('Error connecting to MySQL server.');
$query = "INSERT INTO aliens_abduction (name, email) VALUSE ('John', '[email protected]')";
$result = mysql...
Hey there!
I have very long integer sequences that look like this (arbitrary length!):
0000000001110002220033333
Now I need some algorithm to convert this string into something compressed like
a9b3a3c3a2d5
Which means "a 9 times, then b 3 times, then a 3 times" and so on, where "a" stands for 0, "b" for 1, "c" for 2 and "d" for...