Currently this is how I write a php file using Haml:
%ul#nav
%li
%a
<?php echo l('nav1'); ?>
Output:
<ul id="nav">
<li><a><?php echo l('nav1'); ?></a></li>
I which I could have something like this:
%ul#nav
%li
%a=$nav1
I checked pHaml and phpHaml but coudn't figure out how to use it, and I saw th...
hi all..i've a problem my database become no response..i'm using one page process for many form..last time it can works normally,where is my fault:
switch(postVar('action')) {
case 'newinputdata' : newinputdata(postVar('modelnm'),postVar('serialno'),postVar('faline'),postVar('shift'),postVar('insp_date'),postVar('range_sampl'),p...
I would like to be able to click a link in Website A that will autofill a username and password into Website B.
Can anybody provide me some ideas how to do this with JavaScript or PHP?
Many thanks!
...
Is there any way we can create our own print function in PHP so when using it we can do the following
my_print_function "My Content";
rather than
my_print_function("My Content");
...
In order to test if the converted index.haml would work on with my wamp and localhost i did the following:
First, I renamed my index.php into index.html
Then, I typed html2haml index.html index.haml in the command line
Then, I typed haml index.haml indexnew.html in the command line
I renamed indexnew.html to indexnew.php
I tested it: l...
Hi everyone,
Ive looked and tried but I can't find an answer.
In PHP, is it possible to call a class' member function (when that class requires a constructor to receive parameters) without instantiating it as an object?
A code example (which gives errors):
<?php
class Test {
private $end="";
function __construct($value) {...
I'm trying to install propel_generator version 1.2 (later versions are incompatible with the project I'm working on). I've tried
pear install propel/propel_generator-1.2
But I get the following error:
Failed to download propel/propel_generator, version "1.2",
latest release is version 1.5.2, stability "stable",
use "channel://pear....
Hello,
I'm trying to figure a way where my clients can ping my server via php, and then retrieve the results into format like this "15 MS".
I ended up finding a way where servers can ping servers. However I want to be able to have the remote user somehow ping the server, or maybe have the server ping the client possibly?
function trac...
hello...
i am doing private chat concept. i want to alert beep sound when new user comes in. how to do? i am displaying every thing when new user comes in user details will comes at admin side. but at the same i want to alert beep sound when new user comes.
...
I have the following tables:
======================= =======================
| galleries | | images |
|---------------------| |---------------------|
| PK | gallery_id |<--\ | PK | image_id |
| | name | \ | | title |
| | description ...
Hello,
I would like to replace the link location (of anchor tag) of a page as follows.
Sample Input:
text text text <a href='http://test1.com/'> click </a> text text
other text <a class='links' href="gallery.html" title='Look at the gallery'> Gallery</a>
more text
Sample Output
text text text <a href='http://example.com/p.php?q=...
So I have this database class in PHP and I only have 1 function in it (other than __construct and __destruct. Let me explain further...
I had originally written it so when I connected to a database I would just call my function connect_to_db() which returned a mysqli object. I then used this objects functions (->query(), ->prepare(), -...
i have two textfield..one for show datepicker and another one for time..
but i want after input to DB they can combine become one field inside DB..so that i set field type as datetime...
to make them combine..i'm doing some manipulation inside process.php page..this is my code:
$sql = "INSERT INTO inspection_report ";
$sql.= "(Model,Se...
I've never seen anything like this.
File structure:
somefolder/base.php
includes/stuff.php
includes/constants.php
base.php:
<?php require("../includes/stuff.php"); ?>
stuff.php:
<?php
require("constants.php");
echo "Welcome to stuff.php";
?>
constants.php:
<?php echo "IMPORTANT CONSTANTS DEFINED HERE!"; ?>
Result:...
Could some one explain me this while loop?
while (list($key, $value) = each($HTTP_GET_VARS)) {
$get_url .= $key . '=' . $value . '&';
}
I know its silly but many times silly things makes huge difference....
...
i have a form, i want to send form data to two different action, can I do that in php
...
how to display multi table data in one page like facebook news feed.
example tables /event,task/
i want to sort by datetime new in top.i can do it by php.i need mysql way /Sorry for my english/
event.row1
task.row1
event.row2
task.row2
event.row3
task.row3
...
older
...
Hi guys I'm using zend framework here and I've enabled url-rewrite so all my urls are clean. The thing is that I've incorporated pagination of results on some pages and I want to append parameters to the url in this form:
www.mysite.com/controller/page/2
However I can't do it without appending the default action i.e index to the end ...
Can't wrap my head around this...
Say, we explode the whole thing like so:
$extract = explode('tra-la-la', $big_sourse);
Then we want to get a value at index 1:
$finish = $extract[1];
My question is how to get it in one go, to speak so. Something similar to this:
$finish = explode('tra-la-la', $big_sourse)[1]; // does no...