« first day (1846 days earlier)      last day (3118 days later) » 

1:00 PM
@Duikboot no. I was just checking what that site for
 
pastie is to paste text in and you get an unique url from that, so this chat would not be bashed full of code instead bashed full of links to code.
 
$statement = $this->database->prepare("SELECT COUNT(*) FROM userSessions WHERE userId = :userId");

        $statement->bindParam("userId", $userId, PDO::PARAM_INT);

        $statement->execute();

        $result = $statement->fetch();

        return $result;
Hey guys,
I'm trying to fetch the count,
however, the result is not giving me any value, any idea why?
I pass 1 as the $userId and a row with that userId does exist.
 
@HassanAlthaf you could assign count(*) a name such as 'COUNT(*) as counter'

then the count would be shown using the column name counter.
using that you can do whatever you normally would do grabbing normal column names.
 
@MikeM. Would it be more efficient to grab the entire row and get the num_rows count?
 
@samayo Ratelimits may be with you.
 
1:03 PM
Well no.
You can, but your database is perfectly capable of doing so
 
Alright, i'll try what you said.
 
even if I would do `select name from table` I can just assign a temporary column name as : `select name as troll from table`
then instead column name `name` is used it will use `troll`
 
@MikeM. @Duikboot code pasted
 
        $statement = $this->database->prepare("SELECT COUNT(*) as `count` FROM userSessions WHERE userId = :userId");

        $statement->bindParam("userId", $userId, PDO::PARAM_INT);

        $statement->execute();

        $result = $statement->fetch(PDO::FETCH_ASSOC);

        return $result;
@MikeM. Looks like I'm not getting any return value. It's null still.
I'm trying print_r result
 
var_dump($result);
probably your execute fails.
var_dump($statement->execute());
 
bool(false)
 
That means your execute fails.
 
Damn, is there any way to find the reason for it?>
 
I assume you didn't put it in a try catch, does that output anything?
 
Nope, I'll try a catch
 
1:10 PM
is your database connection PDO or Mysqli?
NVM
it's right there derp
place it in a try catch
and catch the PDOException
Output its values.
 
Output as in a print_r or var_dump?
 
@Machavity lol. Instastar / upvote whatever one does with comments to show affection :P
 
        try {
            $statement = $this->database->prepare("SELECT COUNT(*) as count FROM userSessions WHERE userId = :userId");
            $statement->bindParam("userId", $userId, PDO::PARAM_INT);
            $statement->execute();
            $result = $statement->fetch(PDO::FETCH_ASSOC);

            return $result;
        } catch(\PDOException $ex) {
            $ex->getTrace();
        }
@MikeM. Doesn't seem to return anything for me.
 
@Gordon That's in comparison to what usually happens when you pull in a dependency with Maven. "Oh lets add this small library to the project........aaaand it's pulled in 32megabytes of other libraries, all of which get statically compiled into the application executable."
 
no because you don't return anything.
die(var_dump($ex));
 
1:13 PM
> X-Pingback: http://rene.bloggingabout.net/xmlrpc.php
X-Powered-By: W3 Total Cache/0.9.4.1
X-Powered-By: ASP.NET
^ lol
 
Still no messages from the exception. @MikeM.
 
but I was stupid again, because if you set the exception mode to error, well it errors...
 
@PeeHaa Awesome
 
Anonymous
@kelunik It is still going strong. github.com/4148?tab=activity I would like to see it read 100K
 
@MikeM. Well, it doesn't seem to show me anything. Arghhh. this mySQL.
 
1:15 PM
$userId is set to 1 right?
run this in the console: `SELECT COUNT(*) as count FROM userSessions WHERE userId = 1`

or in phpmyadmin -> SQL
 
It works perfectly on the console.
:/
Found the problem.
PDO object is empty.
 
That was my next step.
Did you connect your database properly?
 
$injector->share('PDO');
$injector->define('PDO', [
':dsn' => 'mysql:dbname=studentnetwork;host=localhost',
':username' => 'root',
':passwd' => '***
'
]);
Are the parameter names right?
 
I use this:
{driver}:host={host};port={port};dbname={name}
,user, password
However that doesn't create the PDO (new PDO(....)) is it?
 
1:21 PM
What is XMLRPC used for?
 
It's a library.
@MikeM. github.com/rdlowrey/auryn
 
Ye okay but if your PDO Object remains null, your connection is not being created.
 
@rdlowrey Having issues with your library. Doesn't build the PDO object correctly.
:/
 
> PDO::__construct() throws a PDOException if the attempt to connect to the requested database fails.
 
@Jimbo Alright, I'll try that
 
1:23 PM
where do you call ->make('PDO'); ??
Do you call it at all?
 
Yup.
It's integrated with my route maker.
 
Aight :-)
 
Hello - for my problem , any idea of solution
what to do...
 
try {
$pdo = $injector->make('\PDO');
var_dump($pdo);
} catch(\PDOException $ex) {
var_dump($ex);
}
I tried that code.
That's my output: object(PDO)#14 (0) { }
 
@ripa you no give us link to code of site.
We need link to code of site.
 
1:25 PM
$pdo = $injector->make('PDO');
 
Where does these backslashed come from? :P
 
@iroegbu Same result.
Looks like I'm moving to Laravel framework now, I don't have time to carry on with this troubles.
 
\PDOException <== stop hitting backslashes!!! ;_;
 
@MikeM. It's because I'm on a namespace, It will resolve it as currentnamespace\PDOException otherwise.
 
@MikeM. link of what? my application?
 
1:28 PM
@ripa Where did you just posted your code to....?
 
@MikeM. I smell a troll.
 
@HassanAlthaf Ye or someone because uber super bad in english :-)
 
@HassanAlthaf if connection fails you should get an exception...
 
@iroegbu I know, could it be my PHP blocking exceptions?
 
pastie.org
 
1:29 PM
Look into your log.
GAWD DAMNIT -.-
 
She's a genius dude.
lol
 
[20-Aug-2015 18:33:35 Asia/Colombo] PHP Notice: Undefined variable: e in /Applications/MAMP/htdocs/index.php on line 12
Thats the last error I got.
 
that's 20-August. I bet that can't be it :P
 
Yup.
My project didn't even exist then/
I think I am moving to the Laravel framework as time is very limited for me.
 
1:32 PM
@HassanAlthaf when you have time and if you feel up to it, follow github.com/PatrickLouys/no-framework-tutorial to the end
You'll get it
 
what if you assign it this way:
$pdo = new PDO('{driver}:host={host};port={port};dbname={name}'
, {username}, {password});

Fill it out and see what that returns with var_dump();
 
@iroegbu Thats what I used. And have used all my live.
@MikeM. sure.
 
@ripa Show us where you assigned the session. NOT where you validate it.
 
@HassanAlthaf if you followed it exactly, then I can help you
You setup Whoops?
 
1:34 PM
SQLSTATE[HY000] [2002] Connection refused
Yup. @iroegbu
 
hi i want to insert data into mysql database here is my query
 
There it is.
 
$dob=$_REQUEST['year']."/".$_REQUEST['month']."/".$_REQUEST['day'];"Insert into teacher (dob)
values
('$dob')";
 
:-)
 
@HassanAlthaf your connection failed
 
1:34 PM
oO @SajjadKhan
 
BAM NO-LIB powers :P
 
@iroegbu I get it when I use host as 127.0.0.1
Nothing when i use this:
$pdo = new \PDO('mysql:host=localhost;port=3306;dbname=studentnetwork'
, "root", "php123");
var_dump($pdo);
So damn annoying. :/
 
@ripa I doubt anyone is gonna help you with a removed library.
 
Wow someone here is being outdated - not saying any names cough cough ripa cough cough
 
1:36 PM
it insert null value means 0000-00-00
 
@ripa Move onto PDO or MySQLi. mysql_* is removed in PHP7.
 
and deprecated since 5.5
or 5.6
 
@HassanAlthaf PHP 7
 
@salathe yh
@MikeM. ikr lol
 
@HassanAlthaf $injector->define('PDO', [':dsn' => 'mysql:dbname=name;host=127.0.0.1'], ':username' => 'username', ':passwd' => 'password');
 
1:38 PM
@MikeM. yes - I know. But it's an big and old application. not easy to change in so quickly. so before changing it to mysqli, are there any solution for mysql?
 
Sooooo you issue is your session is closed to early right? Well put then a max on it. ( 1 hour )
ini_set('session.gc_maxlifetime', 3600);
session_set_cookie_params(3600);
session_start();
@ripa Use PDO.
 
that goes into your Dependencies.php
 
Object Orientated Programming.
Wonderfull word [OOP].
 
@iroegbu It says 3 params, 2 expected.
$injector->define('PDO', [
':dsn' => 'mysql:dbname=studentnetwork;host=localhost',
':username' => 'root',
':passwd' => '***'
]);
I copied this off the official github repo
 
$injector = new \Auryn\Provider(); is what you have in Dependencies.php?
 
1:42 PM
Auryn\Injector
Provider is the old version
 
or wait I'm saying the opposite
Let me delete auryn and redownload
 
Injector is current.
 
@ripa Do yourself a HUGE favor and take a few minutes to read up on SQL injection and how to avoid it
 
@HassanAlthaf are you calling make at all?
 
1:43 PM
lawl, if I would place the rants after eachother about ripa using mysql_*, I think that would be quite hilarious :-D
 
@iroegbu yup.
 
There's no reason \PDO shouldn't throw exception if connection fails, unless you've done something wonky...
 
switch ($routeInfo[0]) {
    case \FastRoute\Dispatcher::NOT_FOUND:
        $response->setContent('404 - Page not found');
        $response->setStatusCode(404);
        break;
    case \FastRoute\Dispatcher::METHOD_NOT_ALLOWED:
        $response->setContent('405 - Method not allowed');
        $response->setStatusCode(405);
        break;
    case \FastRoute\Dispatcher::FOUND:
        $className = $routeInfo[1][0];
        $method = $routeInfo[1][1];
        $vars = $routeInfo[2];

        $class = $injector->make($className);
As per the no-framework-tutorial
Thats where I gotta call the make
 
I meant $db = $injector->make('PDO');
 
yup. I tried that.
 
1:46 PM
before the switch, same place as $request = $injector->make('Http\Httprequest');
 
@Sara yep, you're definitely a small nice whale :-)
 
Made it, and this is my var_dump @iroegbu object(PDO)#14 (0) { }
 
hi
 
Someone an idea what back-end could be used here; digiti.be
 
has anyone here used phpseclib for sftp?
 
1:52 PM
@Duikboot wordpress, so PHP
 
Database name inside constructor? thoughts?
 
when i do $sftp->size($remoteZipLocation); it gives me the wrong file size for my zip file by a factor of about 40 :/
 
Oh god. :/
 
How do you manage your DI? Do you keep it as a global?
 
I use auryn for DI.
 
1:56 PM
Looking at Pimple specifically here, you create your object.. then what?
 
@HassanAlthaf I don't know how to help you further... try making the app break at some point near the PDO make
 
Or just leave what you've done and start over following Patrick's tutorial exactly as is... it should be fine
 
yh the diff is i dont use the templating engine he uses
 
that shouldn't affect PDO
start over...
 
2:00 PM
Let me try the old version of Auryn.
The one pat uses
Not the problem either.
Looks like my laptop doesn't want me to do my proj
 
@Duikboot the blog is wordpress so I assume the whole website is running on it
You will find wp-content
 
Damn, that website is freaking beautiful.
 
Alright, think I'm looking at DIs wrongly, Auryn has a nice section on why it isn't a SL and why SLs are terribad.
 
@HassanAlthaf Did you try using password instead of passwd?
 
@kelunik Yup, it gives me an error saying that it failed to connect and no password was provided.
 
2:04 PM
@MikeM. @HassanAlthaf Could be WP not sure. But... im curious how it looks on IE8
 
it is WP
Well atleast the blog is, and it looks the same as the other pages
 
Let me check my MySQL logs
151105 19:20:17 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
151105 19:20:28 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
151105 19:20:28 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
151105 19:20:28 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
Is anything wrong in there?
 
actually the index page doesn't seem like one.
 
Anonymous
We are seeking a datacenter in Switzerland brave enough to host ProtonMail, many are afraid due to the magnitude of the attack against us.
 
2:15 PM
looks like the DB is perfectly fine.
:/
It's a php problem i guess.
 
Why switzerland
RAM beats DDOS
 
Hi Guys, i am looking for regular expression to parse this url. Actual URL will be like this : xxx.com/course/undergraduate/details/name/human-sciences/alpha/… and I want this URL like this : xxx.com/course/undergraduate/human-sciences.
i did it in other ways like parse the path of string and remove substring after alpha. But i want in one goal with regular expression. Is that possible
could any suggest
 
Hi, question related to php extensions packaging: how do you normally keep package.xml updated (src, test files list, etc)?
I see that it looks like many of package.xml are maintained manually, so are there any recommended way to keep it in sync with extension source unless manually do that?
 
Stream it from a URL?
I honestly am not at a level to answer questions. It's merely a blind guess.
Iteration?
 
I ditched mysql.
lol
 
2:32 PM
hey, anyone familiar with the internals of the imap extension?
 
If you're outputting $_SERVER['REQUEST_URI'] to the page, you should probably escape it, right?
 
@Elyse We should be able to support it properly on the php 7 codebase. I'll have to look into it
 
@Sean
@Sean the request is user-suppled so yes
 
@Stephen Aye, thought as much. Framework we're using has a 404 page which outputs it unescaped. Raised an eyebrow. Cheers.
 
user1804599
@NikiC ok :3
 
2:42 PM
Off topic someone who can help me : How to specify column widths in Mailchimp? I want my main content to be larger and my sidebar to be smaller :P
 
With admin privileges you should be able to edit with firebug
@Duikboot
 
Oh nice
 
Going home :-P .,.(0.0).,. :-)
 
Drag over the column with the mouse
Until they are forced to do the beeping -One Legged Buffaloe - Tim Ports
 
3:01 PM
posted on November 05, 2015 by nlecointre

/* by toubib */

 
@Danack the funny thing is that it sounds funny but is actually factual :D
 
3:22 PM
oO_Oo
 
mornings
 
...doesn't sound funny at all.
 
3:39 PM
sigh reddit ..
 
3:51 PM
morning
 
@LeviMorrison What's all the sighing about?
 
Isn't a sigh the default reaction to realising you've just wasted your time posting on reddit?
 
4:10 PM
Looking over at github.com/blackbelt/php-validation, it seems strange that a validation class would throw an exception if validation fails
is that just me or does it seem odd?
Like, if the purpose of the action is to see whether input matches a set of rules or doesn't, I don't know why it's considered an exceptional circumstance to report any validation issues.
 
hi. i want to create a count variable but each time the page be reset, count be reset

<?php
count=0;
count=count+1;
?>
 
@Sean It's how Symfony does some validation. I don't like that pattern but it comes from decoupling stuff a bit too far. As the call to validation is completely decoupled, the only way it can communicate a validation failure is through exceptions.
 
@sajad Try looking into persistent storage. You could store your variable in a database, by using sessions, or even in a hidden form fields if it's for a form submission count.
 
Validation throwing an exception does seem pretty wrong, unless it's a failure of the validation system itself.
 
@Leigh Maybe validation throws a different exception depending on what's wrong? :-)
I know that's controlling flow through exceptions, but it doesn't cause any problems from what I've seen
 
4:17 PM
@Danack where is it happening?
 
a validator should result in true/false, the caller of the validation routine should be the one to throw an exception
 
@Leigh The problem occurs when you're validating multiple fields. At some point you'll be wanting to iterate through your validation unless you choose to fail immediately at the first wrong field.
 
what do you reply someone (a supe) that replies "I don't know, it doesn't matter" to "Do you know what Single Responsibility Principle is?"
 
The problem then becomes how do you communicate which fields failed validation.
 
4:21 PM
@nikita2206 I saw it in the Symfony console component
 
What I don't like about Symfony's validator is that it will produce a list of ConstraintViolations which can be rendered in a human-readable manner. BUT not in machine-readable way. Which is needed for APIs
 
But my understanding is that the pattern is used elsewhere for actual forms, because of how decoupled the forms are from their validators.
@iroegbu start writing your CV?
 
@Danack nah, it's not. Symfony is not as bad as people portray it in this chat. It's still bad though
 
@Danack I decided I won't resign... I'll just say "Merry Christmas"
and not come back
 
@iroegbu Well we all know how well "Judge, Jury, and Executioner" type situations turn out. :p
 
4:28 PM
@Leigh Why?
@iroegbu You tell them it does matter, and that he should care, and that you shouldn't have to be telling him this - it should be the other way around ;)
 
Hey all
I have simple problem
someone dont busy?
 
@Jimbo his "it doesn't matter" didn't sound like "I want to know what you think", had a tone of "I know better, I don't care about your opinions, shut up and do as I say"
 
@UnderPhp - From the description for this chatroom: Discussion for all things PHP. Don't ask to ask, just ask.
 
Yeah me too. I kissed that very beautiful oboe player yesterday and I'm not sure how to proceed now @UnderPhp
 
@iroegbu All the marks of a poor leader. Let him to his fate
 
4:32 PM
@Jimbo because sanity
 
Ok, so first, IDK good english, but i try.. (i am 14 years old)
 
@Leigh Gotta be better than that - not just because everyone does it, I'm genuinely interested
 
@Jimbo You're asking "is this valid", you expect "yes" or "no". Not "omg shit just got real"
 
@iroegbu I'd probably reply "why do you think that?"
 
i bullied survey system and when i want check if the option Belongs to the correct survey (because client can change the value of radio button)
 
4:36 PM
Was that a question?
 
@iroegbu without knowing the context, it sounds a little bit, like your superior feels threatened in his authority or rather his expertise. or maybe s/hes just not interested in hearing a lecture from a sub.
 
@Leigh I'm not necessarily, I'm saying "if it is valid, continue execution, if it's not, fuck, goto!"
 
@Jimbo goto where and do what? Normally you want the list of errors of the thing being validated....and the calling code know what to do with those errors.
an exception catcher is less likely to know.
 
@Danack Nah, the goto was basically throwing an exception and it being caught
Not a literal goto :P
 
Same t'ing mon.
 
4:39 PM
@Gordon maybe, I was just disturbed. Since I joined we've had to maintain the worse app ever built... we have an oppurtunity to rewrite the whole thing now and he's making a mess of the whole thing.
 
If I have a validator composite that loops around all it's validators, it can store all the errors
 
Jumping to a different place in execution....without the current variables or a sane knowledge of how you got there.
 
@iroegbu you could offer to give an internal workshop. in any case, dont try to to coerce your colleagues, but convince them that your solution is superior or that the training is worth it. change is hard for everyone. and no one likes to feel dumb.
 
He's not a colleague, he's like a supervisor. That's why I ignored him.
 
If he's older, than it could be a defence mechanism.... as we get older most of us tend to get more set in our ways and less open to change
(I don't include my own ancient mind in that loose stereotyping)
@UnderPhp - Where does $surveyID come from? I don't see it defined anywhere
 
4:46 PM
Is it ok to use composer pakages with codeigniter
 
@striker_axel Is anything really good with CI?
 
i worked with CI and i am new to laravel
 
@striker_axel Wow, out of the frying pan and into the fire! :P
 
Please suggest me anything
 
5:05 PM
@striker_axel what are you asking for suggestions for?
 
Is it ok to use composer pakages with codeigniter
 
Sure
Have you used composer before?
 
yes
it is package manager
 
yeps what dependencies are you looking to implement?
 
i haven't define any dependencies but i am thinking to use any of them from available packages
 
5:33 PM
@striker_axel the real question is "is it ok to use codeigniter" ;)
 
hi
i use option box but when it show it contain a default value and that value is fetch from array how to do this??
here is what i try?
while($res=mysqli_fetch_row($query)){
		$birth=explode("-",$res[4]);
		echo $birth[0];
		echo $birth[1];
		echo $birth[2];

<select name="year">
             <option value="" disabled selected>--Year--</option>
            	<?php

							$sel="";
							for($i=1985;$i<=2015;$i++){

							echo"<option value=$i selected=$birth[0]>$i</option>";
							}


				?>
 
@SajjadKhan why does your site not allow bdays before 1985. I feel discriminated against.
 
because it is just a start not complete. so the year change thats not the big deal
right now it is not my problem
 
selected expects "selected" for the value
printf('<option value="%d"%s>%d</option>', $i, $birth[0] == $i ? 'selected="selected"' : '', $i);
so you gotta check whether the value in $i equals the birthdate and if it does add the selected attribute
 
Abe
5:54 PM
Xdebug 2.4.0beta1 (with PHP 7 support) released: http://xdebug.org/#2015_11_05 ! Go test it now!
7
 
6:08 PM
when do you think people will be able to apt-get install php7 ?
 
6:20 PM
@RonniSkansing 2 years
but not with 7 suffix though..
 
Probably by the end of November, but only if you point to the appropriate ppa
 
I wonder if ubuntu 16.04 lts will have php 7 (no 3rd party ppa)
 
Unlikely, not until take-up of PHP7 justifies the effort
 
I dont care, I just dock php7-fpm and be happy
 
@MarcelBurkhard wow
silly me was thinking like 1 year
I really need to reinvest time in docker
 
6:34 PM
@RonniSkansing well it's highly unlike for php 7 to surpass php 5 market shares until the last php 5.x version is end of life + an extra few weeks :P
 
Anyone else have trust issues when a barrage of tests are green?
 
Ahh, I found a bug in Memcached::increment!
 
@Sherif lmao
 
@RonniSkansing You can already install on CentOS 6 and 7 :P
 
So you are telling to use CentOS in the future?
 
6:39 PM
So memcached_increment expects uint32_t for offset, but memcached_increment_with_initialexpects uint64_t, and we cast both to unsigned int. Who was the fucking idiot that wrote this API? Seriously.
 
@RonniSkansing if you google search with filetype:pdf you can find "the docker book" easily
 
@RonniSkansing If you want bleeding edge you don't have to build yourself, yeah
 
thats what I want
/me throws money at the sceen
 
@Machavity yes but that doesn't count
 
@MarcelBurkhard The Remi repo is... blog.famillecollet.com/pages/Config-en
 
6:44 PM
No, but Remi, the guy that maintains the PHP distro for Fedora, has been building PHP7 for CentOS for ages now.
 
@Machavity yes but that doesn't count
 
@MarcelBurkhard Who has a Debian library that does the same thing?
 
We'll also probably see PHP7 in the RHEL "software collection" service, and the CentOS folks might do their own there as well.
 
@Machavity
 
Otherwise we aren't going to see PHP7 in any LTS distro until their next releases. That's kind of the point of LTS distros.
 
6:46 PM
@Charles I don't know why you think I'm implying otherwise
 
Well you seem kinda contrarian on the whole "well, Remi doesn't count towards getting PHP7 in CentOS" thing.,
 
yeah that's because you read my stuff out of context, I'm using the remi repo too
 
Obviously
If you don't use the Remi repo on RHEL you're probably still on PHP 4.0 :P
 
The problem with LTS has been that it got stubborn on staying with the same versions. And thus you wind up with zombie libraries supporting PHP 5.1 because that's what some old LTS shipped with
 
0
A: PHP Memcached with Binary Protocol — Junk data returned after `increment()`

SherifI dug into the PHP extension code that wraps libmemcached and the libmemcached API code itself, but I think I've found the possible underlying cause of your problem... If you take a look at the PHP Memcached::increment() implementation you'll see on line 1858 of php_memcached.c status = memcach...

 
6:48 PM
@Charles the question was when [normal, non ppa using] people will be able to get php 7 with their [default] package manager
 
The last RHEL version to ship with PHP4 was RHEL 4, which is no longer supported. I know this because I still have a 4 machine in live production.
@MarcelBurkhard Well, the answer to that is "the next release." What did you expect the answer to be?
 
@Charles Ah, so you're the guy responsible for this mess
 
@Machavity Oh no, worse. It's actually one of the most important servers in our infrastructure. It's over a decade old. The replacement for it (and the services it provides) won't be ready for months still, and we've been trying to kill it for years...
 
Wow. You have my empathy
 
6:54 PM
I use ppa:ondrej myself. It's generally pretty quick for making new releases available
 
@NikiC so not true, it's 5.3
@LeviMorrison you're the resident CMake expert now right? I decided to give CLion another spin, got a CMakeLists for php-src I can steal?
 
@Leigh same thing
 
I agree, unsupported === unsupported
 
@Gordon are you there??
 
7:09 PM
@RonniSkansing With a PPA already now.
 
ondrej?
 
@SajjadKhan depends on the train wifi
 
@Gordon good now please can you explain your code??
because this is not end. the next thing after getting selected value there is another option and this value is also transfer to another page
 
@SajjadKhan I did explain the code right below the code, didnt I?
 
@Gordon sorry but this work fine on year but i have month selection box also where user select month and the month is alphabetical order not number after use your code in month section it makes all the month to 0?
here is the code
<?php
				$month=array("Jan","Feb","Mar","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec");
				foreach($month as $m){
						printf('<option value="%d"%s>%d</option>', $m, $birth[1] == $m ? 'selected="selected"' : '', $m);
				}
				?>
one more question i don't understand why you use %d%s in value area??
 
7:23 PM
so? change $m or $birth[1] to something that can be compared.
 
it compare number not alphabet? i already try this
 
@SajjadKhan read php.net/printf to understand the formatting options of that function
 
7:54 PM
@Leigh I don't have one yet :D
I'm actually looking at what it would take to port to CMake cleanly.
I see no reason to completely move to CMake if it's messy still.
"The mess you know is better than the mess you don't" type philosophy.
But I think it would actually be an improvement.
Just need to learn more and test a bit.
 

« first day (1846 days earlier)      last day (3118 days later) »