Stats: 3,186,875 members, 7,931,054 topics. Date: Sunday, 25 August 2024 at 03:15 PM |
Nairaland Forum / Science/Technology / Webmasters / Post your PHP Problems Here (64540 Views)
Thread For All Your Blogging Related Problems Here / Get And Request For Your Php Problems Here / Connecting To Your Gmail Account From Your Php Application. (2) (3) (4)
(1) (2) (3) ... (13) (14) (15) (16) (17) (18) (19) (Reply) (Go Down)
Re: Post your PHP Problems Here by lovebondz(m): 11:39pm On Jan 30, 2015 |
fraphael: What? |
Re: Post your PHP Problems Here by lovebondz(m): 12:05am On Jan 31, 2015 |
xyluz: Oh, okay. I guess its the same for most developers. 1 Like |
Re: Post your PHP Problems Here by fordables: 11:11am On Jan 31, 2015 |
I have a serious issue...my website account has been suspended and I want to transfer to another hosting site...is it a must I must re subscribe before I copy my files from my c panel cos I can't access my c panel or is it possible they give me few days window to copy my file for my c panel |
Re: Post your PHP Problems Here by aje75(m): 3:32pm On Feb 01, 2015 |
lovebondz: except u right?? 1 Like |
Re: Post your PHP Problems Here by aje75(m): 3:38pm On Feb 01, 2015 |
Walexwal: first bro dont use sir. am ur home boy nd definately not a pro. k i think u shuld check ur connection string for ur server name and password. d complain seemz line 9 on forum.php am sure u ar aware. lets see where we go from dere. 1 Like |
Re: Post your PHP Problems Here by lovebondz(m): 9:50pm On Feb 01, 2015 |
aje75: Oh, on the contrary, I am uber paranoid about my apps especially web apps. Always looking for vulnerabilities and testing with known attack vectors. So, I do understand what he was talking about. 1 Like |
Re: Post your PHP Problems Here by aje75(m): 10:46pm On Feb 01, 2015 |
lovebondz: i get. one has to be sofar d project goes online. som bada*s guyz out dere 1 Like |
Re: Post your PHP Problems Here by Nobody: 6:33am On Feb 02, 2015 |
Check this out harrisnigeria at dot com |
Re: Post your PHP Problems Here by xyluz: 9:09pm On Feb 02, 2015 |
Re: Post your PHP Problems Here by Adesege(m): 4:02pm On Feb 03, 2015 |
Walexwal: Sup Walexwal, i guess you are a lil bit confused here. Take into consideration what has been said by the other guys. As a security measure, ensure you use strict naming convention on your files and folders. Instead of having a 'config' folder in the root directory, you can just use 'include/config', 'inc/config', 'system/init', 'system/config', 'engine/init' or anything out of the norm. I assume that you are new to PHP programming or new to using a site on remote server, so to better clarify things to your understanding, copy the codes in 'connections/forum.php' here so i can help. 1 Like |
Re: Post your PHP Problems Here by chido4real(m): 11:17am On Feb 04, 2015 |
I need 3 guys for a web application project. I'm mostly into user interface design but I need web programmers urgently for a job. If you are really good at web programming, contact me on this number: 08083845557 (whatsapp) or on BBM: 74F278DC. Please note, you must have worked on a project before and you must be ready to prove real world experience in projects like this. Its a photo sharing website for Nigerians. Functions like instagram but the difference will be communicate to the developers. Must be able to handle millions of users and include features like commenting, liking, sharing and anonymous user posting. |
Re: Post your PHP Problems Here by Walexwal: 9:49pm On Feb 07, 2015 |
[quote author=Adege post=30393228] |
Re: Post your PHP Problems Here by Adesege(m): 10:11pm On Feb 07, 2015 |
For security reasons, please do not include your 'real' password and username, i do not need them and they are to be kept private. It appears that your mysql host is not using "localhost" as its host name. Rather, go to 'user account details' in your control panel to see the value for your host name or you contact them. I can see other errors in the code, but let's deal with this first. Walexwal: |
Re: Post your PHP Problems Here by aje75(m): 10:52am On Feb 08, 2015 |
Walexwal: wow. how generous of you bro putting ur username and password online |
Re: Post your PHP Problems Here by Walexwal: 1:27pm On Feb 08, 2015 |
aje75:that's not my password sir. Its the former one |
Re: Post your PHP Problems Here by Adesege(m): 6:17pm On Feb 08, 2015 |
Re: Post your PHP Problems Here by xyluz: 10:48am On Feb 09, 2015 |
Walexwal: Regardless, i think you revealed too much. |
Re: Post your PHP Problems Here by jorlarmind: 11:27pm On Feb 09, 2015 |
Yea. I reload my system with window 7 starter some days ago, now i am trying to connect my wireless internet,i realise d wifi is not displaying ,mean why the computer wifi is on,on the keyboard Kindly help with solutions Thanks. |
Re: Post your PHP Problems Here by xyluz: 11:40am On Feb 10, 2015 |
jorlarmind: Although this place is for PHP programming problems... so my answer might not be accurate or helpful... but i believe what you need is the right drivers. You can download the proper driver for your windows system Follow this link: http://windows.microsoft.com/en-us/windows7/automatically-get-recommended-drivers-and-updates-for-your-hardware Make more search online if the link is not helpful. |
Re: Post your PHP Problems Here by ps3o(m): 8:43pm On Feb 15, 2015 |
I am a web developer and an ICT Solutionist. to the OP, create a whatsapp group for nairalanders. [link=http://wedevelop.tk]WEDEVELOP[/link] [link=http://sobalajehosting.tk]WEBHOSTING SERVICE[/link] [link=http://foralldevelopers.com]ForAllDevelopers Web[/link] |
Re: Post your PHP Problems Here by Vijon(m): 2:53pm On Feb 21, 2015 |
gud day all,plz help me out wit dis-i cant preview my php files on my wampserver again.if i try accessing it tru d server,it returns an error message.den if i try to open d file using dreamwaver cs5,it trigger d browser to start downloading d php file repeatedly.i ve try uninstalling nd re-installing d wampserver bt d problem is still dere.any help my pple |
Re: Post your PHP Problems Here by babihouse(m): 6:35pm On Feb 22, 2015 |
Vijon: Have you created a site on your dreamweaver? Have you try accessing the PHP page using the url? Try this out. |
Re: Post your PHP Problems Here by Adesege(m): 9:49am On Feb 24, 2015 |
Create a folder in C:\wamp\www, say 'sample'. Then launch ur browser and access http://localhost/sample. Ensure your wampserver is on and has the green icon on the taskbar. Vijon: |
Re: Post your PHP Problems Here by xyluz: 12:40pm On Feb 26, 2015 |
Vijon: What error message did you get? |
Re: Post your PHP Problems Here by kentc3: 2:56pm On Feb 26, 2015 |
This code Uploads a picture into a database, but when i try to retrieve it and display it, the result is blank... i need you guys assistant on how to overcome this coz i ve been stuck here for weeks.. i will really appreciate it... Below is the Upload Script if(isset($_POST['submit'])) { $name=$_POST['name']; $email=$_POST['email']; $pic=$_FILES['photo']['name']; if((!empty($_FILES['photo'])) && ($_FILES['photo']['error']==0)) { $filename=basename($_FILES['photo']['name']); $ext= substr($filename, strrpos($filename,'.')+1); if(($ext == "jpg" || $ext == "gif" || $ext == "JPG" || $ext == "jpeg" || $ext == "JPEG" || $ext == "PNG" || $ext == "png" || $ext == "GIF" ![]() { $newname=dirname(__FILE__).'/images1/'.$filename; if(!file_exists($newname)) { if((move_uploaded_file($_FILES['photo']['tmp_name'],$newname))) { mysql_connect("Localhost","Gospel","gospel" ![]() ![]() mysql_select_db("picture" ![]() ![]() $insert=mysql_query("INSERT INTO `pix`(`sn`, `fname`, `lname`, `image`) VALUES (NULL,'".$name."','".$email."','".$newname."')" ![]() ![]() echo "<img src='$pic' alt='' height='300' width='500'>"."<br>"; echo "<img src='$newname' alt='' height='300' width='500'>"."<br>"; echo "its done! the file has been saved as:".$newname; } else { echo "Error! problem occured"; }} else { echo "error file:".$_FILES['photo']['name']."already exist"; }} else { echo "File format not supported"; }} else { echo "thank you, no file uploadedd"; } } BELOW IS THE RETRIEVE AND DISPLAY SCRIPT <?php mysql_connect("Localhost","Gospel","gospel" ![]() ![]() mysql_select_db("picture" ![]() ![]() $select=mysql_query("SELECT * from `pix` WHERE sn= 23 " ![]() ![]() if(mysql_num_rows($select)==true) { $me=mysql_fetch_array($select); ?> <img src="<?php echo $me['image']; ?>" alt="" height="200" width="120"> <?php } ?> Please i need a solution... Thanks |
Re: Post your PHP Problems Here by xyluz: 3:31pm On Feb 26, 2015 |
kentc3: Try This: <?php mysql_connect( "localhost","Gospel","gospel" ) or die( "Could not connect" ); mysql_select_db("picture" ![]() ![]() $select=mysql_query( "SELECT * from `pix` WHERE sn= 23" ) or die( "could not find" ); if($select) { $me=mysql_fetch_array($select); echo "<img src='$me[image]' height='200' width='120'>"; } ?> If it doesn't work, you can debug by doing var_dump($me), if the image path is being displayed then the problem is your image tag. ++++++++++++++++++++++++++++++++++++++++++++++ FURTHER OBSERVATIONS kentc3: Try this: $ext = $_FILES["photo"]["type"]. That way you can say : if(($ext == "image/jpg"....)){ ... } This checks if your file is an image and that it has the right extension. Try not to use $_POST directly, or any other global variable directly, its better you use some kind of filter like filter_input(INPUT_POST, $fieldname) - read more on that here: http://php.net/manual/en/function.filter-input.php In my opinion, your database connection should be the first thing you do, if the database is not connected, there's no use doing anything else. I hope this was helpful. |
Re: Post your PHP Problems Here by kentc3: 8:26pm On Feb 26, 2015 |
xyluz: The issue remained the same.... i used the var_dump($me) as u said, and the image path was displayed.... the question now is, how do i rectify it coz i have tried all possible ways i know to no avail.... please help out.. i am getting error such as this array (size=4) 'sn' => string '11' (length=2) 'fname' => string 'll' (length=2) 'lname' => string 'll' (length=2) 'image' => string 'C:wampwwwimage.sample/images1/20141216_183233.jpg' (length=49) |
Re: Post your PHP Problems Here by xyluz: 8:27am On Feb 27, 2015 |
kentc3: Try uploading the file without changing the name. Try these debugging tips: Did you check inside the images folder? Is the image there? If the image is there what name does it have? Manually put an image inside the image folder (copy and paste), then try using your code to display the image... Does it display the manually uploaded image? Hope this was helpful? Updated: check the image
|
Re: Post your PHP Problems Here by Nobody: 5:14pm On Feb 27, 2015 |
kentc3: notice any changes to the code ? check the bolded . side talk -- mysql extension is deprecated,use mysqli instead |
(1) (2) (3) ... (13) (14) (15) (16) (17) (18) (19) (Reply)
Top Google Searches By Nigerians 2015;Arsenal,Buhari,Diezani Arrest tops d list. / Mark Zuckerberg Eating Pounded Yam And Eforiro (Photo) / Setting Up Wamp Server To Run On Local Area Network
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 68 |