Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
25
Posts with Upvotes
19
Upvoting Members
12
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
1 Endorsement
Ranked #858
Ranked #2K
~26.5K People Reached
Favorite Tags
Member Avatar for Prateek_2

you need to create routing directives for it. $route['movies'] = "movies/cool"; assuming that you have movies.php in your application/controllers/ directory and it is coded something similar to this class Movies extends CI_Controller { public function __construct() { parent::__construct(); } public function index() { // you can do some other options …

Member Avatar for Arfan_1
0
6K
Member Avatar for webbiesindia

Honestly, you've developed a bad coding habit already. I am not trying to be negative here, but the way I see it, you will have a hard time correcting them. Also, I second the moderator's comments above in regards to your excessive used of static methods. The way I see …

Member Avatar for webbiesindia
0
593
Member Avatar for janicemurby

I thought this $HTTP_SESSION_VARS has been [deprecated ](http://php.net/manual/en/reserved.variables.session.php)100 years ago? I might be wrong.

Member Avatar for pixelsoul
0
194
Member Avatar for mgt

ASP.net is a development framework which allows you to use either C sharp or VB.NET language. There is also a new release called ASP.net 5 that supports angularJS, GruntJs, and node.js. Visual Basic and web forms are somewhat excluded in the features.

Member Avatar for almostbob
0
294
Member Avatar for UK-1991

try including your connection.php after you include the header.php. Include it above all, when header.php is also needing the connection. In your case the $connection is a variable, and one of the Dont's in developers code of ethics is to avoid using variable in global scope. The reason is that …

Member Avatar for pritaeas
0
2K
Member Avatar for adishardis
Member Avatar for adishardis
0
2K
Member Avatar for Stefce

$result->num_rows is a method for select query, while $conn->affected_rows; is for the affected rows after executing an insert query. That's what I think. I might be wrong ????

Member Avatar for Stefce
0
548
Member Avatar for phoenix254

It's a matter of preference. However, regardless of what you use, you still have to loop through the result. There is not much difference between while loop and foreach loop. There is an 8th of advantage if you don't loop inside the logic of your application. What requires the most …

Member Avatar for jkon
0
5K
Member Avatar for Niloofar24

another option that will give you a total control is [php html DOM parser API](http://simplehtmldom.sourceforge.net/manual_api.htm). for example, $scrape = file_get_html('somesite_to_scrape.com'); /* get the css line */ foreach($scrape->find('link.href') as $css_file){ /* this is the css file location */ $css_file; } you can also do it with javascript..

Member Avatar for diafol
0
605
Member Avatar for edbr

you can try creating functions that will sequentially handle the steps. example, function firstStep() { /* create database here */ /* if database has been created */ /* return true; */ } function secondStep() { /* insert dummy data */ } check if ready for the second step.. if(firstStep()){ /* …

Member Avatar for edbr
0
227
Member Avatar for UK-1991

you should add return true; somewhere in your confirm_query() function, preferrably after the die() function and then you can evaluate like this if(confirm_query($insert_query)){ /* you won't pass this point if it is false right? */ /* do whatever you have to do */ } relying on die() function is a …

Member Avatar for UK-1991
0
289
Member Avatar for Ventech_IT

try, public function add_email() { /* set errors var as array */ $errors = array(); $this->load->library('form_validation'); $this->form_validation->set_rules('name', 'Name', 'trim|required'); $this->form_validation->set_rules('email', 'Email Address', 'trim|required|xss_clean'); /* check if any of the validations fails */ if ($this->form_validation->run() == false) { /* take all of the validation errors as errors */ $errors['errors'] = $this->form_validation->set_err(); …

Member Avatar for lorenzoDAlipio
0
390
Member Avatar for younes.keraressi

Hi, Just to give you a simple example. By the way there are many terminologies used to describe what you want to accomplished. On a lower level, it can be called simple router and simple dispatcher. Some will call this as front controller which is a pattern that implements a …

Member Avatar for younes.keraressi
0
292
Member Avatar for klemme

can you post your composer.json? Just want to see how you set up the autoload for PSR-4. For example, I have something like this for the MVC I co-wrote with Veedeoo "autoload":{ "psr-4":{ "System\\" : "vendor/geeglerapp/system/", "App\\" : "vendor/geeglerapp/app/", "Tbs\\": "vendor/tinybutstrong/" } } keep in mind that some packages are …

Member Avatar for lorenzoDAlipio
0
284
Member Avatar for dosek125

$_REQUEST will also process even if the method is not defined. Such as <form method="" action="yourprocessor.php"> Malicious request can also be sent to your site, in this manner yourprocessor.php?name=hello&last=world&code=javascript:;alert(something); print_r($_REQUEST); although the javascript will not cut it on today's advance browsers, the use of $_REQUEST is highly discouraged. It was …

Member Avatar for lorenzoDAlipio
0
269
Member Avatar for AntonyRayan

you can try using is_uploaded_file('some_file'); to validate if the file was uploaded. Another alternative way of doing this is to check if the file has been moved or not. if(move_uploaded_file()){ //do whatever is needed to done } you can also check based on the user's input, $there_is_file = (!empty($_POST['upload']) ? …

Member Avatar for alisajjad160
0
190
Member Avatar for robertlaar

I totally agree with all of the definitions above. On the other hand, frameworks can limit the type of application that you can built. However, there is a framework like CodeIgniter that can be easily bent, molded, and hammered to your requirements. If you will be distributing an application intended …

Member Avatar for cilla
0
277
Member Avatar for davy_yg

this should be an easy thing for you to code. Have you look at jquery ajax?

Member Avatar for Web Dev Rob
-1
197
Member Avatar for AntonyRayan
Member Avatar for AntonyRayan
0
189
Member Avatar for akhila.bhasker

plus, you can rewrite this if($ins>0){ echo "sucess"; } to something like this if($ins){ echo "sucess"; } because anything greater than zero are always presumed to be true.

Member Avatar for lorenzoDAlipio
0
183
Member Avatar for SimonIoa

this $content = file_get_contents("http://www.phpfastcache.com/testing.php"); get the remote page named testing.php from the phpfastcache.com by way of cURL, API or mySQL query. for example if the testing.php returns <!doctyp html> <html> <head> </head> <body> <h1>Hello world </h1> </body> then the cache class will make a cache file of the page and …

Member Avatar for SimonIoa
0
636
Member Avatar for AntonyRayan

I totally agree with the above response. Once you declare an abstract method within abstract class, it will impose a mandatory must have method in the child class. Unlike, in factory pattern a class can also be written in abstract class without abstract method, but methods within the abstract class …

Member Avatar for diafol
0
202
Member Avatar for richardham31

If you are really serious about your question and willing to invest a $1.99 for a good used PHP book. Look for the book entitled Programming PHP(second edition) by Rasmus Lerdorf, Kevin Tatroe,Peter MacIntyre. It is currently on sale for $1.99 at barnes&noble. You can also look for the PHP …

Member Avatar for diafol
0
142
Member Avatar for Dani

It would be nice if we can have server side js e.g. node.js, google polymer and jquery.mobile sections. I honestly believe that node must be treated as a server side scripting like PHP.

Member Avatar for Reverend Jim
1
864
Member Avatar for Lorele
Member Avatar for rgracey

I honestly believe that the lastInsertId() is the most error proof for this purpose.

Member Avatar for broj1
0
186
Member Avatar for solomon_13000

I think PHP is pretty loose in implementing license compliance. Providing link to your webpage is an excellent way showing your appreciation to the creators and contributors of PHP distribution. You can also aknowledge them by just including your acknowledgement inside the source code. for example, <?php /* * source …

Member Avatar for lorenzoDAlipio
0
212
Member Avatar for Naren arora
Member Avatar for hell hansen

you probably need node.js. It is a server side javascript. Server side javascript can pretty much do what other server side scripting languages can do.

Member Avatar for lorenzoDAlipio
0
181
Member Avatar for sam_pt