Hi,
We have discussion in my job place about question (We use 1 of the php frameworks):
Why program with php frameworks big web application if it can be done better with rubi on rails, python or java?
Please say our opinion
thanks
...
I have been working on a Timesheet Management website. I have my home page as index.php
//index.php (only relevant portion shown)
<?php
session_start();
if($_SESSION['logged']=='set')
{
$x=$_SESSION['username'];
echo '<div align="right">';
echo 'Welcome ' .$x.'<br/>';
ech...
Problem: Blank email from PHP web application.
Confirmed: App works in Linux, has various problems in Windows server environment. Blank emails are the last remaining problem.
PHP Version 5.2.6 on the server
I'm a librarian implementing a PHP based web application to help students complete their assignments.I have installed this appli...
I'm trying to use Ajax to call a PHP script to write to two different HTML tags. The PHP script generates a string that is unique every time. So, I cannot call the PHP script twice. Are there any creative ways to write to two different HTML tags using the same call to the script?
To clarify, I do not want the two tags to contain the sam...
I have a dictionary in jsons form like this:
$user = "{ name: Mary , born: 1963, money: 213 }";
I need to pass it throught this field:
<input type="hidden" name="custom" value="" >
and then insert it in the db:
INSERT INTO user ( name, born, money ) VALUE ( $name, $born, $money )
How can I do that ?
...
Goodmorning everybody!
Can you please help me?
I have a problem with this part of the script:
$output = cal_top();
switch($action){
case "add":
include("includes/event.php");
$output .= cal_event_form('add');
break;
case "delete":
include("includes/delete.php");
include('includes/viewdat...
Hi again.
OOP drives me crazy. I can't move PDO to work. Here's my DB class:
class DB extends PDO
{
public function &instance($dsn, $username = null, $password = null, $driver_options = array())
{
static $instance = null;
if($instance === null)
{
try
{
$instance =...
I have a registration form with checking the available name for username field through ajax. Inputing a username into username field and pushing the "Check!" button, the script sends value to php script. Then php script replaces the username field with the username field + style like this:
So when replacing the username field in the f...
How could I convert a unix timestamp , i.e. from time(), into a m-d-Y string using php?
...
Hello all,
I've got a scenario where we have a customer who has a linux hosted php app (joomla) that they wish to integrate with some back-end asp.net mvc functionality that was created for a 'sister' site. Basically, the mvc site has prices and stock availability methods which (in the sister site) populates dropdown lists and other 'or...
I was wondering if there is a (webbased) way to scale down a whole website and put it into an iframe. [including images etc], so that a user would get a fully functional preview of the website (only for websites without frame busting methods of course).
...
Hi,
I am creating Hang a Man using PHP, MySQL & Javascript. Every thing is going perfect, I get a word randomly from DB show it as a label apply it a class where display = none. Now when I click on a Character that character become disable fine which i actually want but the label-character does not show.
My code is:
<link href="style.cs...
Hello
I am working on an image gallery at the moment. When a user is logged in, an x appears over each image and a checkbox next to it to enable the user to delete that image. Only if the checkbox is checked will the image be deleted.
They are both in a (one for each image in the gallery), the small image "x.gif" is an input type="imag...
I have developed a PHP web app. I am giving an option to the user to update multiple issues on one go. In doing so, sometimes the user is encountering this error. Is there any way to increase the lenght of URL in apache?
...
I have this conventional submit button which submit a form like this:
<form method="post" id="form_submit">
...
<input class="button" type="submit" name="Submit" value="Submit">
</form>
And I check if the submit button is clicked using this:
if(isset($_POST['Submit'])){
//update DB
}
Now I have a submit link using jquery:
<a hr...
Hi all
I read http://forum.kohanaframework.org/comments.php?DiscussionID=5744&page=1#Item_0
and I want to use similar solution, but with db.
In my site controller after():
$theme = $page->get_theme_name(); //Orange
Kohana::set_module_path('themes', Kohana::get_module_path('themes').'/'.$theme);
$this->template = View::factory('lay...
So basically when I type something with an apostrophe, such as John's bike it will echo John\'s bike. The code below:
<?php
$searchname = $_POST["name"] ;
echo "$searchname";
My form uses the POST method. Is there any way to stop this?
Also to make input case insensitive how would I go about in this segment?
$searchsport = $_POST['s...
I would like to get a list of well-known buildings(museums, castles etc..) within X meters radius of the current coordinate. I would like to query them in PHP.
Do you know any such database that can be queried?
...
Hi everyone,
I have a bit of an array headache going on. The function does what I want, but since I am not yet to well acquainted with PHP:s array/looping functions, so thereby my question is if there's any part of this function that could be improved from a performance-wise perspective?
$var = myFunction ( array('key1', 'key2', 'key3'...
Hi everyone,
I have the following code:
$cluster['local'] = array('host' => '192.168.1.1', 'port' => '11211', 'weight' => 50);
$cluster['local2'] = array('host' => '192.168.1.2', 'port' => '11211', 'weight' => 50);
$this->memcache = new Memcache;
foreach ($this->cluster() as $cluster) {
$this->memcache->addServer($cluster['host']...