Hi Guys,
I read the other day that assigning values within if statements isn't such a great idea.
To be honest i actually use this quite a lot e.g.
if(isset($_POST) && $post = $_POST) {
print_r($post)
}
Any idea why that isn't optimal?
Thanks in advance!
...
I am trying to insert , update some data into MS Access database using ODBC ,
that data came from
$string=html_entity_decode($unicodedata, ENT_NOQUOTES,'UTF-8')."\n";
that look like this " ബാലകàµà´¯à´·àµà´£à´¨àµ*à´¨à ",actual data needed like this പ്രമോദ്കുമാര്,
i have worked on this with Mysql , which has connection collatio...
Hi everyone
i am going to use codeignitor php framework to develop web application. now i am confused about using IDE. I do not know which IDE is best suitable for codeingitor framework. is there any one who can help me in this regard.
thanks.
...
I am selecting data from a MySql database and doing the following
echo "<input type=\"text\" name=\"distadd1\" id=\"distadd1\" class=\"textbox\" value=". urlencode($row['ADD1']). " >";
however the value is being displayed as follows Department+of+Planning+%26+Development.
how do i remove the + and %26
...
preg_match_all('|(.*?)|', $read, $foo, PREG_SET_ORDER);
print_r($foo);
output as just
Array ( )
Where i made mistake
See guys ,
Actually i want to grab the exact details from this URL
i want to pick this details from this URL
08:35 9W5048 TORONTO EXPECTED 1358 Terminal three
So i tried this snippet , but...
Does anybody know how to create drop down/ filter options for a particular column when you create a .csv file with php. I am generating a .csv template and want to give the option of choosing only the filter values as cell data for that column.
...
Right now, lets say I have code much like this...
$some_var=returnsUserInput();
function funcA($a) {...}
function funcB($a,$b) {...}
function funcC($a,$b,$c) {...}
$list[functionA] = "funcA";
$list[functionB] = "funcB";
$list[functionC] = "funcC";
$temp_call = list[$some_var];
//Not sure how to do this below, just an example to show...
elloo,
i've done some more php 5 certification mock exam questions however i cannot be sure that i'm right with some of the questions so i have decided to post them here. my answers are below each question
if i'm wrong please feel free to criticise. many thanks in advance
Q2. The _____ keyword is used to indicate an incomplete class o...
I'm looking to cURL a URL and keep track of each individual URL it goes through. For some reason I am unable to accomplish this without doing recursive cURL calls which is not ideal. Perhaps I am missing some easy option. Thoughts?
$url = "some url with redirects";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
...
Hello,
I am new to using CURL, and a novice PHP coder. I would like to take specific elements on a web page (that change via AJAX) and input them into a databse using CURL. As of now, I can write a text file of a web page using CURL, but I dont really know where to go next. Any help would really be appreciated!
...
Hello,
I am using sessions to pass user information from one page to another. However, I think I may be using the wrong concept for my particular need. Here is what I'm trying to do:
When a user logs in, the form action is sent to login.php, which I've provided below:
login.php
$loginemail = $_POST['loginemail'];
$log...
Hi All,
I'm trying to integrate Amazon Product API into my website and came across several posts that helped me construct the URL. Only problem is when I execute the code below I get the following error. Am I doing something wrong?
Internal Server Error The server
encountered an internal error or
misconfiguration and was unable...
I have a web application that runs fine on our Linux servers but when running on Mac OS with the Zend Community Edition Server using PHP 5.3 we get the error "usort(): Array was modified by the user comparison function " every time a page loads for the first time (it takes about 2 minutes for a page to tick over and load, on the linux se...
Hi all,
I'm struggling to connect to my MS SQL Express 2008 edition from my PHP files, but it seems virtually impossible.
I've found several guides/notes on teh intarweb solving the issues, but none of these have helped me any further.
I've taken a script from another site and entered my database information, but I still get errors:
...
I use Zend Framework 1.10 with integration on Doctrine 1.2.
in the application.ini file, i declare the 'dsn' to connect to database.
in my application i need to connect to another db to run some queries.
how can i do it ?
i only need to run query , i don't want to generate all the Models for this DB.
right now in the bootstrap.php...
Why all PHP Functions for (Array , String , Database etc. handling) arent True OOP Methods.
We can just call them like 'static' methods anywhere. PHP5 and PHP6 advertise themselves as True OOP Languages , but what about Encapsulation then ? I think In a proper World all Array methods should belong to Array Class and String Methods should...
this is my current function:
$result = $db->sql_query("SELECT * FROM data1,data2,data3,data4 WHERE person='" .$name. "'");
$row = $db->sql_fetchrow($result);
$day = $row['regtime'];
$days = (strtotime(date("Y-m-d")) - strtotime($row['regtime'])) / (60 * 60 * 24);
if($row > 0 && $days < 15){
$row = ['name'];
$row = ['age'];
//etc
bu...
Is there anyone who knows a good free PHP 5.3 hosting? I've searched for long but I couldn't reach to find anything till now. Hope that someone can help.
...
Hi,
I have files named in foreign characters, that I have uploaded after encoding the names using utf8_encode(). But now, when I m trying to download them using readfile(), they give "not found" errors.
I have pasted the code below. I think the problem lies with some header I have defined. Can anyone tell me what's the problem?
======...
I want to parse one site. Structure of the table:
inside many (if site is being updated number of is not the same).
inside this we have (with class="a" and second class="b" and thrid class="c" and fourth class="n" only free space) and (with class="d").
Example with this structure:
<table>
<tbody>
<tr>
<td class="a"></td>
</tr>...