I was wondering how can I update my two database tables using PHP and MySQL? I want to add a second table called tags_2 that will check if a tag already exists and if it does add it to the current count in the table and if the tag does not exist add it to the table.
I hope I explained it right?
I basically need help in adding the corre...
I want to know how Java (JSP) on Tomcat compares to PHP on Apache in terms of performance.
Two servers with the same hardware configurations, one running Tomcat/Java (JSP) the other Apache/PHP, both servers maxed out with how many connections they can handle at once. Would they be somewhat close or would one pull away from the other one...
Hi guys! I would appreciate some help here:
What I want to do:
remove &itemsperpage=10 from:
http://localhost/thi/search/filter.html?type=featured&page=2&itemsperpage=10
and create a link from it:
http://localhost/thi/search/filter.html?type=featured&page=2&itemsperpage=15
here's what I have come up with so far:
<...
Or is there a software to auto generate random passwords?
...
I found a cool MySQL backup script. It's working fine on some hosting companies.
Now I'm trying it on a different host running PHP Version 5.2.8.
I have a php.ini file that contains this (in both root dir and current dir):
disable_functions =.
I'm getting these warnings, and it seems like they are more than warnings.
If the exec(...
I have a simple C (of CRUD) function, and I'd like to send a message (error or success) along with my redirect from the "insert" function I have written up. Is there a way to adhere a POST field with a redirect?
In pseudo code I have:
function view_all{
//set up some initial variables
$this->load->view(viewing_page, $data)
}
f...
i want to send a php variable $thread_id to php file using jquery ajax, so the php file can get all posts for $thread_id and echo it back to main file.
it doesnt work when i type:
$.get("ajaxcall_reply.php", thread_id: $thread_id, function(data) {
$("#threads").html(data);
});
how should i type?
...
I have the following piece of jQuery code:
function saveSchedule()
{
var events = [];
$('ul#schedule-list').children().each(function() {
events.push($(this).attr('value'));
});
jQuery.each(events, function()
{
alert(this);
});
$.post("schedule_servic...
Hey I have dynamic image begin created with imagecreate(), and I have random values being produced, and I want to pass that random number, to a variable, and use that variable inside the page where Im using the image source.
The image is on random.php, and Im using <img src="random.php" /> on page index.php if that matters, and I want ...
This is part of the XML I want to edit
<ScrapBook>
<Event>
<Name> Name of Event <Name>
<Other Elements>
</Event>
<ScrapBook>
I need to modify the Name of the Event.
I am able to delete the node using remove_child. But I dont know how to add another element at the same spot.
This is my code:
public function editEventNam...
I cant get the data between the tags into the arrays:
// Load the HTML string from file and create a SimpleXMLElement
$html_string = file_get_contents("data/csr.html"); /*the string really is in $html_string*/
$root = new SimpleXMLElement($html_string);
Problem starts here when I try to get that the value between the tags: div, h2 and...
Im adding a premium section to my site which already has free registration. People who will pay a monthly fee will have access to content (html, images and media files) that will be hosted on a subdomain lets say..... content1.domain.com
How would I make it so files that are delivered via that subdomain, cannot be hotlinked or copied, u...
Hello. I have some (crappy) software that nevertheless works on all the installs I've done except this new one. The problem seems to be that session variables are not being set, or that every time session_start is getting called it destroys the old session, even though I am using cookies. Looking at php.net's info on sessions,
I came ac...
Hi all,
I am sending an NSData Object to the server script running PHP.Is it possible to collect that object in PHP ?
Is it possible to get NSArray,NSString, NSData or any Custom Objects (Subclass of NSObject) in PHP ?
Thanks
...
I want to insert data into a table, then if the table already has that same input value of rName then it is to update this row (as rName is a unique index) which it all does well.
But on the UPDATE I would like it to only UPDATE the fields IF the field doesn’t already have something in it (NULL).
INSERT INTO $table
(`rDate`, `rName`,...
I would like to store the login, logout and duration time in database.
The login time is created when the user is authenticated(successfully logged in)
The logout time is created when the user clicks the logout button
The duration is logout - login time. (logout minus login)
But the problem is, what if the user didnt click the logo...
I have been using Joomla and I love its administrative facility to put the site down for maintenance. As I have seen, all requests to the site if it is in maintenance mode is routed to a single page. If I want to add my own "site down for maintenance" module for a non-Joomla site, how do I do this? I am using an MVC framework in PHP call...
Hi
I am working to send email with the html body. Body html is posted by php variable with ajax. but all html will be ignored.
for example in email.php
HTML element
<textarea id="html" cols="20" name="TextArea1" rows="2">HTML code is here</textarea>
Javascript
var html = $("#html").val();
$.post("function.php", { html: html }, fu...
Hi All,
Im a little stuck with the following function. Please note, Im a total noob with javascript/ajax, so please bare with me:
<script type="text/javascript">
function removeElement($parentDiv, $childDiv){
if (document.getElementById($childDiv)) {
var child = document.getElementById($childDiv);
var par...
Can somebody please suggest a comprehensive book on Drupal? It would be great if the book is available online (and free :) )
...