It gives the wrong result. I use Dreamweaver and i just started to learn PHP i find it very hard to debug.
</html>
<head>
<title>Login Form</title>
</head>
<body>
<fieldset><legend>Login</legend>
<form action="login.php" method="post" /><br/>
Username<input type="text" name="User" /><br/>
Password<input type="password" name="Pass" /><b...
I'm new to PHP, trying to find a way to list the pages for my menu and also include index.php
Here's what I'm using:
<div id="navigation">
<ul>
<?php wp_list_pages('sort_column=menu_order&sort_order=desc&title_li=&depth=2&')?>
</ul>
</div><!-- end id:navigation -->
Site can be viewed here: http://www.ho...
Hi,
I have a viariable that contains something like this ab_123456789
how can i check if the variable starts with ab_?
thanks,
sebastian
...
I've got a friend trying to learn php (they've never used a programming/scripting language before). They have a minimal understanding of html. I've used tryruby.org a little bit once, and I'm hoping there's something similar for php. I learned using books, but I don't want them to have to go through setting up a server on their localhost...
Hello All,
I've had this problem for awhile now, but I keep narrowing down the issue and I think I have main problem figured out now. While my JSONstore calls to the PHP correctly, and firebug does give me the correct data back from the database, it will not display in my grid.
I have a grid with only 2 columns a date, and an entry fro...
Possible Duplicate:
Zend PHP5 Certification, does it matter?
Who passed this exam and how it helped employment?
Is it difficult to test?
Duplicate questions from The Zend PHP Certification Practice Test?
...
I posted this question last week, but I wasn't very clear on what was needed. So I'm reposting right now.
I have a string stored in a database, which looks something like this:
<5u79cfda 4d01ga3a 11c833f9 7b52df2a 7g210252 e21b01fa a73d3463 9ge0e412>
I'm trying to insert this into a web address, but needs to be encoded properly for it...
I am making a website where users can upload pictures and draw on them, add text etc. My team knows some php, but we know nothing about c#. Time is not too much of an issue. We all know java, what would the perks of each be? I have been hearing that c# will be much better for handling the canvas because there is a lot more libraries ...
<?php
$agent=getenv("HTTP_USER_AGENT");
if(preg_match("/MSIE/i", "$agent")){
$result="You are using Microsoft Internet Explorer.";}
else if (preg_match("/Mozilla/i", "$agent")){
$result= "You are using Firefox.";}
else {$result = " you are using $agent.";}
?>
<html>
<head>
<title>Browse Match Results</title>
</head>
<bod...
I'm checking to see if certain mp3's exist. While sometimes there's no problem, certain valid mp3 files are shown as 404, not found. Here's the code I'm using:
$ch = @curl_init($file_path);
@curl_setopt($ch, CURLOPT_HEADER, true);
@curl_setopt($ch, CURLOPT_NOBODY, true);
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
@curl_setopt($ch,...
like this:
if ($sth) make_private($this->method);
or maybe there's some other way to affect accessibility of methods ?
Problem is that I written a class where methods must be called once, so I need code to restrict access to given method from outside the class after this method was executed.
...
Is there an easy way to change $month = "July"; so that $nmonth = 7 (07 would be fine too).
I could do a case statement, but surely there is already a function to convert?
EDIT:
I wish I could accept multiple answers, cause two of you basically gave me what I needed by your powers combined.
$nmonth = date('m',strtotime($month));
That...
I have the following C++ function:
void foo() {
std::cout << "bar" << std::endl;
}
I'm porting this to PHP via SWIG. Everything compiles fine and the extension loads properly. I'm able to call foo() from PHP, but I only see the bar output if I run the PHP script from the command line.
$ php script.php
bar
If I load the script i...
I was given the task of creating a registration page for an upcoming church retreat. Design-wise, it will consist of fields for name, sex, phone number, email, and grade. We need a way for the end user to put their credit/debit card info and have it charge them for the retreat.
After some searching I found that Braintree offers a good s...
Hello,
I am dynamically creating combo boxes with PHP for a calendar:
<?php $i=1; while($i <= $daysInMonth){?>
<table align="center" style="width: 435px">
<tr>
<td class="style1"><p><label id="<?php echo($month.'-'.$i); ?>"><?php echo($month.' '.$i); ?></label> </p></td>
<td class="style1"><p><select name="<?ph...
I am wondering whether there is a way to format the fonts for my datavalues. I have two sets of data that I want to plot on the same graph but I want to format the data values differently.
...
Hi, I'm trying to download images to a ZipArchive, from a social networking site via their API, I'm using the following code:
...
public function downloadAlbumZip($album_name, $photos)
{
$zip = new ZipArchive();
$album_name = $this->_cleanAlbumName($album_name);
$filename = 'album.zip';
$file = tempnam(PHOTOS, "{$album_n...
Hello,
I have a MySQL table called "privatemessage" with a primary key field called "messageid."
I would like to have a PHP query that deletes any row from "privatemessage" where "messageid = $messageid."
What sort of query does this?
Thanks in advance,
John
...
I've been trying to connect to my own site using both CURL and the PHP file_get_contents() function to get source of my webpage without success. I am running the PHP script on the same server that I am trying to get the HTML source from. CURL doesn't return any errors, not even when using curl_error(), and the PHP file_get_contents() fun...
this means can we develop php mysql based desktop applications which dont require browser to run.i.e runs like java applications.
if so how ???
...