php

How to implement 2 rows and width to fit in the column in web development?

<td style="width:230px;overflow:hidden;"> <?php echo $something; ?> </td> What I'm doing is to cut $something to 2 rows at most,and add ... when necessary, but this kind of requirement seems clue less when trying to implement, Solutions within the scope of php/javascript/css are appreciated! anyone has ideas? ...

Execute PHP without leaving page

Okay. I have a form - textarea (named "su") and submit button. When the form is submitted, I need to run a PHP script without refreshing/leaving page "echo" or somehow print a return on the screen I'm pretty sure this works via some kind of ajax request thing. but I have no idea what I'm talking about. I'm not big on ajax or javasc...

Why is Twitter returning a "Failed to validate oauth signature and token?"

Hi guys, Sorry for troubling you with yet another "Failed to validate oauth signature and token" error, but I just can't figure out what's wrong with my request. I'm constructing my signature from this string: POST&http%3A%2F%2Fapi.twitter.com%2Foauth%2Frequest_token&oauth_callback%3Dhttp%3A%2F%2Fcraiga.id.au%2Ftwitter%2Fconnected%26o...

Questions about Wordpress 3.0 RC

I'm looking to upgrade my blog from Wordpress 2.5 to 3.0 RC, but I'm not sure if: It is stable? It will support existing v2.5 plugins? It will support my custom themes? Or do I have to design them from scratch for 3.0? Many thanks for your help! ...

Setting up MySQL database

I do have single database and near about 11 tables. while my web page is opening informations from these 11 tables will be accessed same time. according to my current settings what I did now is for each table database is opening and closing. say I had given username and password to open databse for each table and close after retrieving i...

php function to make slug (url string)

function gen_slug($str){ # special accents $a = array('À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','Ø','Ù','Ú','Û','Ü','Ý','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ñ','ò','ó','ô','õ','ö','ø','ù','ú','û','ü','ý','ÿ','A','a','A','a','A','a','C','c','C','c','...

How to create sql insert query dynamically in mysql

I am creating an application where I am generating pins dynamically based on user's input and storing them into mySql database. $sql = "INSERT INTO tblpin ('pinId', 'ownerId', 'usedby', 'status') VALUES for($i=0;$i<$npin;$i++) { ('$pin[$i]','$ownerid', 'Free', '1'); } ;"; how can I do that...

what is the main difference between PHP4 and PHP5

what is the main difference between PHP4 and PHP5 ...

PHP MySQL Select multiple tables

Is it posibble to select 3 tables at a time in 1 database? Table 1: employee --> employee_id --> first_name --> last_name --> middle_name --> birthdate --> address --> gender --> image --> salary Table 2: logs ...

Is PHP a web Technology or a scripting language?

Its very basic and silly question.... Is PHP a web Technology or a scripting language? I believe as it is scripting language, but why other believes it as web technology? and if its a scripting language then in which web technology does the PHP counts in? i know it might seem a vague question to some people, but lets face the truth ...

Please suggest a freeware PHP IDE

Possible Duplicates: IDE for PHP? What is the best IDE for PHP ? Currently I code PHP with Notepad++. Any ideas about better PHP-centric IDE out there? Any help is much appreciated. ...

How apache server handles session?

Please tell me how apache server store each logged user's session details. ...

How can I use a clean URL only in a subfolder of my website?

Hi, I have a web site http://www.mydomain.com Here I have created a sub folder http://www.mydomain.com/products. I want to change all the page inside the product folder as clean URL. I know .htaccess should be inside product folder. If it's enabled, will it affect all the parent directories and files of my site I mean http://www.my...

CSV File Content Display Issue

Hi, I want to retrieve contents from a csv file for that i am using following code: <?php $fo = fopen("record.csv", "rb+"); while(!feof($fo)) { $contents[] = fgetcsv($fo,0,';'); } print_r($contents); fclose($fo); ?> But my records are displayed in the following format: 䅲牡礊⠊††嬰崠㴾⁁牲慹ਠ†††
ਠ†††††⁛そ‽㸠"...

How to find first non-repetitive character from a string?

I've spent half day trying to figure out this and finally I got working solution. However, I feel like this can be done in simpler way. I think this code is not really readable. Problem: Find first non-repetitive character from a string. $string = "abbcabz" In this case, the function should output "c". The reason I use concatenation ...

Error during data INSERT in php

here my code- $sql = "INSERT INTO tblpin ('pinId', 'ownerId', 'usedby', 'status') VALUES "; for($i=0; $i<sizeof($pin); $i++) { if ($i>0) { $sql .= ", "; } $sql .= "('$pin[$i]', '$ownerid', 'Free', '1')"; } $sql .= ";"; echo $sql; mysql_query($sql); if(mysql_affected_rows() > 0) { echo "done"; } else { echo "Fail"...

image upload and cropping

How can we upload and crop the image using PHP. ...

PHP: read all files but randomly?

hi there, i wonder if there's a way of reading a directory in a random order. With the following code i'm running through the directory thumbs and it's printing images on my website. However, they are always read alphabetically and i wonder if there's a way in doing this randomly? <?php $path = 'thumbs'; if ($handle = opendir($path)) ...

How do I decode this! It's not base64

Here's what I know... this "GxvS117MfVw=" when decoded turns to "56699" now what does this "+sB6hF46GyU=" turn into "?????" " not included I tried base64 decoder and it doesn't seem to be right. It is supposed to be a number. I am not sure about the length, I don't think it should exceed 5 numbers. I would really appreciate it if you...

login/logout problem in PHP

i have a question. I have a website in which i am giving security like login id and password( as usual). No what i want is that, 1) I don't want to allow a single user to login in different machine at the same time. 2) For this i am using a column in database which is keeping the current status of user(i.e. loging/logout). I am allowi...