I know this is an old thread.
What you need to do is forget about saving the variable returned from:
stream_socket_c lient("unix:///tmp/hs.socket",$err no,$errstr,2.0,
STREAM_CLIENT_C ONNECT|
STREAM_CLIENT_P ERSISTENT);
The stream_socket_c lient() is persisted when you make an identical call, from the same process.
So you can...
User Profile
Collapse
-
There are a few problems going on here:
The first is in the javascript.
Code:<textarea name="coment" id="coment" cols="32" rows="5" value="Search" onfocus="if (this.value==this.defaultValue) this.value='';">type here your comment </textarea>
Leave a comment:
-
How are you viewing the HTML source?
Some browsers will interpret a <tag></tag> as <tag />.
[HTML]if (is_null($key) || !isset($key))[/HTML]
Is useless here. isset($key) will always return true. NULL converts to an empty string with echo() so there is no need to test if its null, then write out the literal <option></option>....Leave a comment:
-
-
Code:return apply_filters('sanitize_user', $username, $raw_username, $strict);
This is only necessary if the filter replaces or removes patterns of characters in a sequence. For global replacements like htmlentities() it would not be needed.Leave a comment:
-
You've named one of your form fields "submit".
[HTML]
<input type="submit" name="Submit" value="Execute" >[/HTML]
That overwrites the submit() method of the form. Name it something else so that you can still use the submit() method....Leave a comment:
-
You have to send the right HTTP Headers that define the Content-Type.. eg:
[PHP]
header('Content-Type: image/png');[/PHP]
If you image is a png image.
Then read the binary image data from teh file and output it in the HTTP Body.
[PHP]
// send HTTP headers
header('Content-Type: image/png');
header('Content-Length: '.filesize($bin ary_file_path)) ;
// send...Leave a comment:
-
I haven't used PHP's built in SOAP client so I can't help you with how to turn the escaping off.. however, if you remove the <![CDATA[ tags it would be equivalent to the actual CDATA wrapped in <![CDATA[.
It would work unless the soap server actually needs the <![CDATA[ tags?...Leave a comment:
-
I know this is considered solved, but I want to mention that:
These cache problems are because you're using HTTP GET Requests. If you don't want a your XMLHTTPRequests to be cached, use a HTTP POST. Thats what it's for...
see: http://fijiwebdesign.com/content/view/92/77/
If you're really worried about it caching so much, then use unique URIs for your HTTP POST.
eg: pseudo code:
...Leave a comment:
-
md5 is supposed to be a one way encryption. The reason you use it, is so only the user knows their password, but you can still validate the password.
How you validate it is to create an md5 hash of the password supplied by the user, and compare that with the md5 hash of the password in the database.
eg: pseudo code
[code=php]
$user = $_POST['user']; // username from form
$password = $_POST['password'];...Leave a comment:
-
How is this better than creating a table based on a select query?
CREATE TABLE `View_WidgetTag s` SELECT `Data_Widgets`. `widgetid`, `Data_Widgets`. `desc` AS `widgetdesc`, `Data_Tags`.`ta gid`, `Data_Tags`.`de sc` AS `tagdesc` FROM (`Data_Widgets` LEFT JOIN `Map_WidgetTag` USING(`widgetid `) LEFT JOIN `Data_Tags` USING(`tagid`)) WHERE `Data_Widgets`. `widgetid` > 999;
And then running queries on that table?
...Leave a comment:
-
What do you mean by "when I click on the SUBMIT button, it doesn't work"?
What actually happens when you click the submit button?
Does it not do anything at all?
Do you got to the next page, but the it is blank?
Does it go to the next page, but you don't get an email with results?
Do you get an error?
Also, the use of "$HTTP_POST_VAR S" is deprecated since PHP4.1+. Use...Leave a comment:
-
The function "mysql_num_rows ()" returns the number of rows in the mysql result of a SELECT or SHOW statement.
An UPDATE statement does not return any rows. To find out if the update actually worked, or affected some rows in the database table, then use: "mysql_affected _rows()"
If you're doing an INSERT and want to know the id of the row the insert was made, use: "mysql_insert_i d()"...Leave a comment:
-
Very interesting.
You don't really need version tracking.
A user has their own folder. They have a read folder, and a write folder.
Each file upload they make is sent to SQL, and removed from the ftp write folder. Each download they make is the SQL query result, and is also removed after reading.
That way, a user only has data in their write folder when they have written an sql query and are waiting...Leave a comment:
-
This is definitely a JavaScript question.
As this can only be achieved via JavaScript, you don't have to worry about the href attribute.
So do something like:
[HTML]onclick="this.o nclick=function () { return false; };"[/HTML]
If the onclick returns false then the browser will stop the link/form from being submitted.
So after the first click, the onclick will look...Leave a comment:
-
If you post a bit of your code it would be easier to figure out the problem.
What you're trying to do I believe is "screen scrape" the contents of another webpage and display it on your webpage?
If you do something like:
[PHP]echo file_get_conten ts("http://www.sample.com/a.php");[/PHP]
You will echo the whole HTML of the page http://www.sample.com/a.php from your php...Leave a comment:
-
-
What is happening is that PHP is matching as many characters as it can for the quantifier .* in your regular expression.
To make the quantifiers match the least amount of characters use the "un-greedy" indicator, "?".
eg:
[PHP]preg_match_all( "/(\[([\w]+)\])(.*?)(\[\/\\2\])/", $content, $matches);[/PHP]
notice you now have (.*?) matching the characters in between...Leave a comment:
No activity results to display
Show More
Leave a comment: