39,326 Topics

Member Avatar for
Member Avatar for unikorndesigns

Please analyze the following code. This is being used in CodeIgniter framework... $results["rows"]=$this->Category_model->getAll(); $i=0; while($i<count($results["rows"])) { //$parentids[]=$results["rows"][$i]->cat_id; $disparray[]=array( "cat_id" => $results["rows"][$i]->cat_id, "cat_name" => $this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_name"), "cat_parent_id" => $this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_parent_id"), "cat_desc" => $this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_desc"), "cat_num_posts" => $this->Category_model->fetchnumposts($results["rows"][$i]->cat_id), "cat_parent_id_name"=>$this->Category_model->fetchcatinfo($this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_parent_id"), "cat_name") ); $array=explode(",",$this->Category_model->fetchallkids($results["rows"][$i]->cat_id,0)); foreach($array as $item) { if(strlen($item)>0) { $spacecount=substr_count($item,"&nbsp;"); $id=str_replace("&nbsp;","",$item); $spaces=array(); …

Member Avatar for unikorndesigns
0
187
Member Avatar for NardCake

Hello! I'm creating a larger scale application in PHP and i'm using a .ini file to store some configuration for the user, quite easy to fetch data with the parse_ini_file function (returns array) but how would I write to a ini file, or the most convienient way to do so. …

Member Avatar for NardCake
0
5K
Member Avatar for garyjohnson

This is my upload form for html to upload only one pic, <html> <body> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="Submit"> </form> </body> </html> I want to be able to upload multiple pictures at once. This is my php code for uploading. <?php …

Member Avatar for garyjohnson
0
778
Member Avatar for ritesh0104

I am currently working on a membership registration web form, wherein we have to take details of the member being registered online. i need to know his Country, State/Region and City. i am looking for a database/list so that we can provide the same in a combobox in the registration …

Member Avatar for Wailintun
0
271
Member Avatar for guilherme.carvalho.9250

Hello to everyone, im having some trouble in setting a position on a table in php. I learn how to display a table in php on school and with some research through the internet, but not how to customize it. Is it possible to display a mysql table from a …

Member Avatar for guilherme.carvalho.9250
0
1K
Member Avatar for hwoarang69

how to get part of col name in query. for ex: les say i have these rows in table: id name last address 1 dave da new york 2 rand ra ohio 3 random a new now i want to get rows where address has a word new in it. …

Member Avatar for tiggsy
0
119
Member Avatar for ravi372

Hey guys! I see alot of discussions going on in this community. Well, I am new here. Was just going through random discussion threads and I can see how much efforts goes into all this. Really appreciate. I have something to ask. I am working on a warehousing/inventory management application …

Member Avatar for Exheon
0
174
Member Avatar for suniverm
Member Avatar for prasadssaitwal

<?php function getlink($x) { $y=$x.'.php'; return($y); } $a=array('0','1','2','3','4'); for($i=0;$i<5;$i++) { echo '<li><a href='.getlink($a[$i]).'>'.$a[$i].'</li>'; } echo '<iframe src="">'; ?> when i click on the links instead of new tab it should be open in iframe

Member Avatar for veedeoo
0
386
Member Avatar for furlanut

I have added 3 radio buttons to a form (no errors prior to this) for option to sort fetch_array result by field. I assume this is best done from the array but am making no progress - the results of $name,print_r($array) and tables are correct but no sorting. This Notice …

Member Avatar for diafol
0
143
Member Avatar for PhilEaton

I am new to python web frameworks. I am using web.py because I like how raw it is. I am wondering though, how one can produce pages and scripts efficiently when being restricted to sending output through the return keyword? It seems like for any python module you can only …

Member Avatar for Gribouillis
0
242
Member Avatar for GraficRegret

I have adjusted a lot of the code that I posted earlier but nothing seems to work, I put in the code to show all errors and I am not getting any errors returened after I fixed the single minor misstype of adding an extra "(" into the code, i …

Member Avatar for GraficRegret
0
161
Member Avatar for bornie21

Hie guys. I want to create a LAN web based application that allows a user to login and change their current Windows Active Directory password or login name. Much like the Powershell scripts but I was looking to implement using PHP over the LAN. Any ideas?

Member Avatar for diafol
0
155
Member Avatar for firdousahmad
Member Avatar for GraficRegret

I found a tutorial on how to build a php events calendar and this tutorial uses a mixture of php, Ajax and Javascript to form the calendar, everything works properly and displays well, up to the point of actually pulling up and displaying the events details which are pulled from …

0
98
Member Avatar for Karry.Stewart

I have a datagrid which is successfully loading a database in my .PHP page that loads Title, Location, and Date. I have struck up, struggling to allow only 8 records at a time with a pagination. Also a link has to be created for 1st column where it links the …

Member Avatar for diafol
0
169
Member Avatar for mehnihma

I am new to php and mysql I want to crate a query that does the update or adds a new table if it is not in database. I get on else for echo: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/public_html/shop/dokumenti/up2.php on line 53 …

Member Avatar for mehnihma
0
297
Member Avatar for OldDeveloper01

Hey if anyone could help me out, that would be superb. It is probably something simple but i am always getting undefined index messages. This is the latest example. [B]Notice: Undefined index: savebtn in C:\xampp\htdocs\practice\editprofile.php on line 20[/B] And this is the php. [CODE] if ($username){ require ("scripts/connect.php"); if ($_POST['savebtn']){ …

Member Avatar for pzuurveen
0
1K
Member Avatar for daniel36

I need to send email from my local server.I lisent that it is possible through gmail server.can anybody tell me how can i send email from my local server throurgh gmail.I have searched on google and did not get appropriate answer.Thank you in advance.

Member Avatar for daniel36
0
108
Member Avatar for lttleastig

I used this script to load the page but instead of loading the page it saved it as an .xls file header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=Sched.xls"); // Fix for crappy IE bug in download. header("Pragma: "); header("Cache-Control: "); Works no problem on my pc server running xampp>apache but when i …

Member Avatar for lttleastig
0
187
Member Avatar for Fiorentino01^

Hi, I have a site under construction.It is not on line yet and I don't have a domain name yet. I test it with IIS 7 and works fine.Now I need a form to collect inmformation from visitors.The information should be sent to me by email. I looked at various …

Member Avatar for moneeshot
0
231
Member Avatar for alex.p.kcx

Hi, With resources on the internet I have created two versions of a login page :- one with mysql_fetch_object and the other without it. I would like to understand which approach is a better and why. Following is the code with mysql_fetch_object :- <?php session_start(); include "dbconnect.php"; if(isset($_GET["op"]) == "login") …

Member Avatar for broj1
0
376
Member Avatar for onofej

hello everyone, i have read through other post but could not resolve my issues. i need someone to see to my code. i am trying mysql_real_escape_string for my datas. but the one without it can insert properly while the one with the mysql_escape does not. from my code, i am …

Member Avatar for onofej
0
107
Member Avatar for GraficRegret

well here I go again it is probobly a minor mistake that I am missing, however I am having issues getting the 'description' that I have entered into my database to show up inside the div when the 'details' button is clicked, to follow are each page of code allong …

Member Avatar for GraficRegret
0
144
Member Avatar for jayreis

I am trying to send an email via php with an attchment. Before anyone suggests using pear or swiftmailer I am aware of all of them but have a host who refuses to install any of them on my clients hosting account. So I am stuck with writing this function …

Member Avatar for jayreis
0
266
Member Avatar for GraficRegret

ok I have a login form that works and checks but I can just pout in the url to go to a specific page inside of the website I am designing and get into it without logging in, how can I remedy this? I have gone through many tutorials and …

Member Avatar for GraficRegret
0
268
Member Avatar for itsmeurdude

help please!!! i have installed xampp v3.1.0.3.1.0 it seems that my apache is not really working everytime i click once apache it turns yellow then says 9:39:44 PM [Apache] Status change detected: stopped 9:39:44 PM [Apache] Error: Apache shutdown unexpectedly. 9:39:44 PM [Apache] This may be due to a blocked …

Member Avatar for veedeoo
0
382
Member Avatar for sarithak

Hi friends, I am struggle from last coup[le of days with this error. Error: `Forbidden You don't have permission to access /reports.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.` I tried to solve this by searching …

Member Avatar for veedeoo
0
143
Member Avatar for jacob.tonna.58

script in file 1 <?php // Check if he wants to register // - Make sure that param exists // - Check length if (isset($_POST['username']) && strlen($_POST['username']) > 0) { // Check if passwords match. // - Make sure that params exist // - Check length // - Check matching …

Member Avatar for simplypixie
0
379
Member Avatar for RaeesIqbal

I am a traniee yet, and I've been working out on this code to let a member change his password using $_POST method, but i am missing something and i cant find out what it is, any quick help will be very appriciated. This is the page for form using …

Member Avatar for simplypixie
0
239

The End.