I'm a big fan of PHP and it's obviously a very weakly-typed language. I realize some of the benefits include the general independence of changing variable types on the fly and such.
What I'm wondering about are the drawbacks. What can you get out of a strongly-typed language like C that you otherwise can't get from a weakly-typed one li...
I'm following this tutorial to access the del.icio.us api, but this is my first time using cURL or OAuth so hitting a few snags.
I'm using the following code
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.login.yahoo.com/oauth/v2/get_request_token?oauth_nonce=123456789&oauth_timestamp="+$timestamp+"&oauth_co...
Hi there:
For example, I have a HTML form with several input buttons,
<form action="/index.php" method="post">
<input type="hidden" name="hf" />
<input type="submit" id="apply_action" name="action" value="Apply">
<input type="submit" id="cancel_action" name="action" value="Cancel">
it's the current framework of a large web pro...
I'm using Dreamweaver to publish my website to the web server. I have a php file called init.php that I include in my pages containing information relevant to connecting to my DB. The information is different depending on whether I'm running on my local test server or on the remote server. I would like to have a remote init.php and a ...
Hey all,
i have java classes that i call from my html file using this ajax code.
$.ajax({
type: "POST",
url:"http://www.verifiedalerts.appspot.com/verifiedalert?action=addIntrusionRules",
dataType:"text",
async:false,
data: "params=" + objStr,
success: function(data){
...
Possible Duplicate:
Is there an easy way to convert a number to a word in PHP?
Is there a function or fast way to print a number as text (i.e., "one" instead of "1")?
...
Hi folks,
I have a web-app that is a sort of calendar application and there are several tabs across the top. I currently have those tabs open to new pages so the users back button still works as expected.
I recently integrated a "help" box that is a div that is within the header and remains constant through all pages. Within that help...
Right now im sorting by each articles auto_increment id with the query below
mysql_query("SELECT * FROM articles ORDER BY id DESC");
I wanna know how to sort by a date field i made, that stores the current date via, strtotime() it should query the dates from newest to oldest.
Current code
$alist = mysql_query("SELECT * FROM artic...
I need to attach an XLS-file to e-mail via PHP.
The Problem is - Spreadsheet_Excel_Writer send a HTTP Header to a browser an then the content. Spreadsheet_Excel_Writer API has no any functions like get_content to become the file content directly. I don't want to save the file first, I just want to jump this step over, saving the content ...
Hello
Could somebody tell me the name of function that convert spaces to underscores and letters to lowercase for seo friendly uri's?
I know it's very easy function to implement but I want use function for this job if exists in Drupal already.
Regards
...
I'm building my first PHP project, and am not sure where to put external libraries like doctrine. I could put them inside my app, making it easier to reference with a relative path:
myproject
app
public
lib
doctrine
log
Or I could put them outside my project directory structure, making it easier to share between mul...
I have some CSV files that I need uploaded to a site I'm writing in CodeIgniter.
I need to validate the CSV to make sure they contain various info, column counts match up and stuff like that.
Does CI have any sort of plugin to make this easy?
...
So I am looking to sort the multi dimensional array below by "fk_page_id" ascending. Does anyone have any pointers. I think usort() is where I have to look but it seems like I cant find anyone with my specific array structure.
Array
(
[0] => Array
(
[title] => subpage of subpage!
[id] => 5
...
I'm generating a view that lists all nodes created by this user. To restrict it to the currently logged in user, do I need to use Filters or Arguments?
I thought Arguments -> User: Uid, but not sure how to specify current logged user as the argument.
...
Dear all
I have database of website link, it list out in main file ,when i try to click that link it get to redirect on that database link.
my code is
test.php
<?php
// getting from database
echo '<li onclick=\"window.location='.$result->website.'\">
<a href="#">'.$result->option.'</a></li>';
?>
The Main.h...
hey all,
im getting this error, and i don't know why.
Fatal error: Maximum execution time of 30 seconds exceeded in E:\web\autoopti\thanks.php on line 65
The code I have for the PHP script is:
<?php
$key = 129;
$email = $_REQUEST["payer_email"];
$first = $_REQUEST["first_name"];
$last = $_REQUEST["last_name"];
$...
Hello all,
I am using jQuery Form Validation Plugin to do comprehensive client side validation.
Now I would like to use PHP to do the server side validation.
Check whether the email is email, age is in the right range, etc.
Is there similar package or function collections that I can use rather than write all validation method manuall...
I'm trying to modify devel generate module to prevent it from generating content by users who don't have the permission to generate this content type.
Problem is I'm fairly new to drupal so I'm not familiar with its hooks. Can someone give me some hints how to approach this.
http://ftp.drupal.org/files/projects/devel-6.x-1.20.tar.gz
...
So this may be the way my server is set up but I'm banging my head agianst the wall. What I'm trying to do is say that if $action has no value or has a value that is not "add" or "delete" than have an error else keep running the script. However, I get an error no matter what $action is.
$action= $_GET['a'];
if((!isset($action)) || ($a...
My JavaScript is as follows:
$.get("/<page>.php", "userid='.$userid.'&"+status, function(data){
$("#status").show("fast").html(data).delay(4000).hide("fast");
});
I have many links on a page that will load this jQuery AJAX and display the status in a div correctly. It all works fine, except if a user click many of the link...