I have mixed html, custom code, and regular text I need to examine and change frequently on several, long wiki pages. I'm working with a proprietary wiki-like application and have no control over how the application functions or validates user input. The layout of pages that users add must follow a very specific standard layout and alw...
I am making a website where users can vote on which category a page is. They can vote that the page is in category a, b, c, or d.
I need to find the most commonly occurring category in the MySQL row out of all the votes.
Each time a user submits their vote, it submits the "category" that they voted for, and the "page_id".
I have thi...
I have an insert:
$sql = 'INSERT into orders SET
fax_int_prefix = "'.$_SESSION['fax_int_prefix'].'",
fax_prefix = "'.$_SESSION['fax_prefix'].'",
fax_first = "'.$_SESSION['fax_first'].'",
fax_last = "'.$_SESSION['fax_last'];
The value of all of these fields is that they are blank right before the insert. Here is an example of one o...
I am trying to write a PHP-MySQL database processor that is somewhat intelligent. When this processor decides it needs to make an update, I want to report if it was really successful or not. I thought I could use mysql_affected_rows...
// Example:
// After running query "UPDATE mytable SET name='Test' WHERE ID=1"
$result = mysql_affec...
I recently did a mailing to a lot of hotmail addresses and now all the e-mails I send out (from PHP by the way) don't seem to reach their destination. So I figure hotmail banned my url...
Is there any way to get rid of this ban so my e-mails will reach the users again (like activation e-mails etc)?
...
I am always wondering that the login systems I have created is vulnerable to attacks or not.
As many other programmers I also use sessions to hold a specific token token to know the login status. Cookies to hold the username or even sometime saved status.
What I am wondering is, Is this the right way? Is there any approach better than...
What's the equivelent of char.IsLetterOrDigit() in php 5?
...
Hi there,
Well, I am writing class that creates a DOB selection dropdown.
I am having figure out the dropdown(), it seems working but not exactly. Code just creates one drop down, and under this dropdown all day, month and year data are in one selection. like:
<label>
<sup>*</sup>DOB</label>
<select name="form_bod_year">
<option value=...
I have a lot of data that contains characters that will normally break RSS. Is there a function or library in PHP that will handle these characters so they are suitable to be printed in an RSS Feed?
...
I am getting this error when I pass an invalid SQL string... I spent the last hour trying to find the problem assuming - It's not my SQL it must be the db handle... ANyway, I've now figured out that it was bad SQL...
What I want to do is test the result of the mysql_query() for a valid resultset.
I am simply using empty($result)... Is ...
I'm an admin for a page and I want to give certain users dynamic control of the menubar layout. The ideal would be a page with a list with menu items and arrows pointing up and down with each item and when you click them the item is reordered. I have a pretty basic idea of how I can do it but I would like some suggestions.
The items are...
Sorry, but there's a lot of outdated and just plain bad information for Zend Framework, since it has changed so much over the years and is so flexible.
I thought of having an AJAX module service layer, with controllers and actions that interact with my model. Easy, but not very extensible and would violate DRY. If I change the logisti...
What is the Url.Content() of asp.net mvc equivalent in php?
I have a file that use my style.css from both pathes:
'artciles/123/name'
'artciles/123'
How can I use links to static content, witout using absolute urls?
...
Hello guys.
Just want to know if there is a way to detect how many times a user has clicked a button by using Jquery.
My main application has a button that can add input fields depend on the users. He/She can adds as many input fields as they need. When they submit the form, The add page will add the data to my database. My current ...
I have set up a website (www.autobodypartsnow.com) and the search function has gone haywire. Whenever you search for anything, it returns every product in the system making it useless. I have fiddled around with it with no prevail.
I have done the Like and FullText thing in the Configuration - nothing.
I have reset the Search and FS ...
Please execute the following queries first to set up so that you can help me:-
CREATE TABLE IF NOT EXISTS `Tutor_Details` (
`id_tutor` int(10) NOT NULL auto_increment,
`firstname` varchar(100) NOT NULL default '',
`surname` varchar(155) NOT NULL default '',
PRIMARY KEY (`id_tutor`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4...
Okay, I am not getting any response with my original wordy wordness...
Can you execute script before setting cookies, or must it be the absolute first thing?
Can you set cookies, and is it practical, with $_POST or $_GET
if not practical...or secure...what can I do to make sure my cookies are set securely (at least more secure than th...
I have just moved my code over to a new server (running on Apache 2.2.3), and PHP's DOM functions are now returning "Fatal error: Class 'DOMDocument' not found".
I did some research and it appears that the installation I am now on does not have PHP's DOM functions enabled.
I need to enable these functions, so what is the quickest way t...
This is a long shot. I believe this might be suhosin patch issue.
Here is my php from codeigniter:
public function uploadprogress($id) {
if ($id) {
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
echo json_encode(apc_fetch('upload_'.$id));
exit()...
How can I use the first query's id value $row['id'] again after I run a second query inside the while loop statement? To show you what I mean here is a sample code below of what I'm trying to do.
I hope I explained it right.
Here is the code.
$mysqli = mysqli_connect("localhost", "root", "", "sitename");
$dbc = mysqli_query($m...