I have a login form in which i have a username, password and a remember me radio button option. Now I want it so that when I've signed out from home page and I try again to login then without asking for a username and password I get logged in because I am going to store the username and password values into cookie.
I wrote code on passw...
is it usual to use controllers in models?
then you have to include the controller in the model?
...
Hi, I'm just wondering how I could remove the text between a set of parentheses and the parentheses themselves in php.
Example :
ABC (Test1)
I would like it to delete (Test1) and only leave ABC
Thanks
...
Hello,
I'm creating an application in PHP5 that needs to store a unique URL for a website. For example, if a user enters "http://www.google.com/" ill store it in the DB as "google.com" after parsing it. Basically I need a consistent convention for URLs so that there aren't multiple entries for the same site.
Basically, is it ok to be ...
I have an array of player's IDs. There will generally be about 5 players, not likely to be more then a dozen:
$cplayers= array(1,2,5);
I want to display the players names as a list.
$query = "SELECT username,id FROM users ORDER BY id";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
$playercoun...
I'm pulling the url parameter and I'm trying to create a breadcrumb out of it. So, if I pull:
$url = 'contact/jane/now';
and I do:
$path = explode("/",$url);
How can I put it in a loop so that it breaks each part into a path like this:
<a href="/contact">contact</a>
<a href="/contact/jane">jane</a>
<a href="/contact/jane/now">now...
from javascript i request for a php file. and this php file will call a model that extends a super_model.
i wonder where i should include this super_model. in the php file (which acts like a controller) or in the model?
i've got other models too, should i include the super_model they all extend in the controllers that are calling them,...
When i declare mac = 123, my internet explorer and firefox will keep refresh non-stop. And if i declare mac = getMacAddress it returns a value 1...
I'm able to do a document.write(getMacAddress()) and it would able to display the mac address nicely.
1) Why my explorer will keep refreshing non-stop when i code it manually with "123"
2)...
Using PHP I'm trying to convert the cipher text generated by mcrypt into binary but when I try and convert it back to the cipher text it doesnt get converted back properly so it cant be decrypted. I'm assuming my encodings are getting messed up somewhere but I dont know where to start to figure it out. Here is a link to the site http://d...
Heya
im looking to validate a string and make sure it is the following format
"thumb_*.jpg|gif|png"
where * is a wildcard, and jpg|gif|png are optional file extensions
this is in PHP
Is that possible?
ps: i just want return value true or false
...
i just upgraded from jquery 1.3.2 to 1.4 - and I found my sortables serialize not working anymore?!
anyone else experience this problem? heres the code:
$(document).ready(function() {
$("#list_to_sort").sortable({
handle : '.handle',
update : function () {
var order = $('#list_to_sort').sortable('serialize');
$("upd...
Hello ..
I want to insert an array in ONE field in mysql database using PHP ..
this is work fine :
HTML :
anotherField :<input type="text" name="anotherField" />
fax :<input type="text" name="f[]" />
email :<input type="text" name="f[]" />
phone :<input type="text" name="f[]" />
PHP (I use CodeIgniter frame) :
<?php
functi...
if i've got string functions i use a lot, should i put them in a helper class or a library class?
functions like: truncate string if longer than 30 characters, return a random string, make all lower cases and so on. these are functions that i probably don't need to create an object for. it's better to use them as static methods.
should...
I have a Rudy on Rails backend which I use because it has some libraries that other languages don't have. I'm trying to use it as a web service/backend and accept requests from PHP/general HTTP request pages. It should be very simple - hopefully, accept a JSON object and respond with a JSON object. Rails seems to default to a RJS/ non-st...
I am try to find if a certain node has siblings, and if it does, I would like to know what those siblings are.
Is this possible?
...
I am on windows
I am using PHING to zip up some files
I have lots of things being zipped
Zipping works, except for ones that include a particular phing fileset in the files being zipped
When I debug, I can see in phing's ZIP Task that ZipArchive::close is returning false. The error string reads "permission denied". In the manual it stat...
Hi
I want to list all tables in my mysql database.
I want that each table list with column name and datatype.
So how could i do this, any query or something like that.
Running on php
Thanks
Avinash
...
hi friends,
I want to give some type of ratings to my posts in my site.
i want to do this coding some like the below site
http://www.comminit.com/en/node/222010/2754
i want to do this type of ratings in my site.
Does any one have code to do this.
or any one can tell from where i can download such type of codes...
...
I am trying to put an html string inside of xml with php like this:
<?php
$xml_resource = new SimpleXMLElement('stuff.xml', 0, true);
$xml_resource->content = '<![CDATA[<u>111111111111111111111111111111111 text</u>]]>';
$xml_resource->asXML('stuff.xml');
?>
but for some reason my xml file looks like this:
<?xml version="1.0"?> <data>...
I need to create a menu item, which changes its title and link if a user has a certain condition, or not.
Drupal caches all the menues, so i can't really think of a way to do that.
For example, user has a node attached to his profile, menu item is "Create blabla" (link node/add/blabla)
User doesn't have the node, menu item is "Create no...