If I want to make adding something to an XML file very simple can I do this:
<small>$1.99</small>
<medium></medium>
<large>$3.99</large>
Can I leave the medium element blank and tell the php parser to ignore it?
I'm thinking that when I parse it I am going to want all the sizes returned but not a size with no price.
...
I have found a fairly significant issue with IE8 with regard to setting cookie expirations to 0 (so as to log a user out when they close the browser). It seems that each new tab or window is counted as a new session, so if a user opens a page on the site in a new tab/window, they have to login again unless they selected the option to st...
Hello, I'm new with this API thing, so I don't know how to use it very well. I want to make an application on C or PHP or AppleScript to check if a file is downloadable. I just need to know how to send the request properly.
I read the API docs but I still don't know how to get the return values.
Can anyone help me?
Happy holidays ever...
how do you check if a user already has logged in?
so that if a user in another browser cant log in with the same account.
also, is this a good solution or should i let the user log in in the other browser and then log out the current user and display a message (you are logged in from another location) just like messenger does?
...
Why does the following code give me an error in php?:
$b = array("1" => "2")["1"];
Error I get is Parse error...
Help.
...
Hello, I'm trying to create an unordered list of <a>text1 text2 text3</a> elements, with a while loop. This list is then styled using #sidebar li a in my CSS.
My problem is that the text1, text2, text3 that is passed into each <a> element in my while loop can take on different lengths and I would like for them to be spaced equally l...
i want to have an automatic maintainance of my mysql database.
eg deletes all old threads, users and checks if a user hasnt been active (ive set up that javascript is updating a status column in mysql) for over 60 min, i set the persons status as logged out in mysql. stuff like that.
now how should i do this part. should i write this c...
When a user casts a vote the script updates my database but it wont display the following code below to tell the user its vote has been excepted.
//This will output the movie id, new rating, new votes, and a message.
echo "<result id='".$id."' rating='".$rating."' votes='".$votes."'>Vote cast and saved.</result>n";
How can I fix thi...
Say, this is my query
$stmt = "SELECT * FROM foo WHERE x=?";
How do I print the above query plus the bound parameter to the screen or to a file in PHP?
When I print $stmt it says:
mysqli_stmt could not be converted to string
Here's my code:
if ($stmt = $this->conn->prepare($query)) {
$stmt ->bind_param('ss', $un, $pwd);
...
How do I use a function that I defined in a parent class in the child class?
for example if i use a class like the below
<?php
class mat
{
function square($x)
{
return $x *$x;
}
}
class matchild extends mat
{
function doublesquare($x)
{
return square($x) * square($x)
}
}
?>
If I try the above , I get an error saying th...
Now when I have a user cast a vote the script updates my database but it won't display the following code below to tell the user its vote has been excepted everything else works correctly except my AJAX code.
How can I fix this problem to get the below code to display the new rating when user enters his or her vote?
I'm using PHP
Here...
Related, possible duplicate: http://stackoverflow.com/questions/1892409/php-mail-problem
Hello;
I have a site hosted on GoDaddy, that processes several news web sites and emails a summary of articles. It has been working fine, until two days ago when I stopped receiving emails. mail() returns true, and when sending basic te...
i have coded a forum and now im going to code the post a thread part.
i wonder how i shall proceed from here. i want it to be like Stackoverflow where you have some buttons above the textbox where you can click for different thing you want to insert eg. "hyperlink", "image", "code sample", "numbered list", "bulleted list" and so on.
a...
how can i update a table when a user close the page or exit from that page..................
...
Having only a valid GD image resource is it possible to find out the type of the original image?
For instance:
$image = ImageCreateFromPNG('http://sstatic.net/so/img/logo.png');
Can I get the original image type (PNG) having only the $image variable available?
...
i am making a chat with php ajax i want to show a message if the user has not typed any thing more than 1-2 minutes or event not navigating from one page to another.......if so than shows a message in the chat box [ last message recieved 2-3 mintus ago ] like in yahoo.......
...
I have defined an abstract class and a method which is supposed to return the name of a template file. The user subclasses this abstract class and implements that method to return the template file name. But the problem is, that there happens no warning or whatever if the user just does not return anything.
How could I make this sure? T...
Example: A method is supposed to return an instance of a SpecificClass. How can I check that return value if it is from that class?
...
Hello all,
I think I know the answer for this question allready, but just as curious I am, I'll ask it anyways.
I'm running a webshop which products come with a csv file. I can import all the objectsng without any trouble, the only thing is that images and thumbnail locations are not exported with the the database dump. (it's never per...
I have a problem with my RegEx. I want to translate a BBCode Link like
[link=www.stackoverflow.com]Stack-Overflow[/link]
into a HTML Link like
<a href='www.stackoverflow.com'>Stack-Overflow</a>.
In my String it's possibile to make more than one link in BBCode.
I Also need a function to translate the html back to BBCode.
My f...