Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,432 members, 7,954,713 topics. Date: Saturday, 21 September 2024 at 07:45 AM |
Nairaland Forum / Science/Technology / Webmasters / Post your PHP Problems Here (64690 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) ... (14) (15) (16) (17) (18) (19) (20) (Reply) (Go Down)
Re: Post your PHP Problems Here by kentc3: 5:48pm On Feb 27, 2015 |
xyluz: Thank you very much, it is now working...... i remove the dirname, and moved the file to the directory straight, without changing the name of the file... SEE MY CHANGES BELOW I replaced this $newname=dirname().'/images1/'.$filename; if(!file_exists($newname)) { if((move_uploaded_file($_FILES['photo']['tmp_name'],$newname))) { with this below $newname='images1/'.$filename; if(!file_exists($newname)) { if((move_uploaded_file($_FILES['photo']['tmp_name'],$newname))) { And it is now working..... Thanks, i really appreciate |
Re: Post your PHP Problems Here by lovebondz(m): 7:29pm On Feb 27, 2015 |
kentc3: Properly check if a file is an image using exif-imagetype |
Re: Post your PHP Problems Here by Vijon(m): 8:44pm On Feb 27, 2015 |
Adesege:i did nd it seems to work.bt d older files stil cant b access |
Re: Post your PHP Problems Here by exellent91(m): 10:59am On Feb 28, 2015 |
I need help. I need someone that is good at promoting website by getting more traffic,to help me in my site,http://megadownloads.moreforum.com. When the person signs up,he or she should pm me(send me private msg through the site to be made a moderator and an admin.thnx |
Re: Post your PHP Problems Here by xyluz: 8:22am On Mar 02, 2015 |
Jregz: Or PDO... |
Re: Post your PHP Problems Here by xyluz: 8:24am On Mar 02, 2015 |
kentc3: You're welcome. Try to use either mysqli or PDO, mysql is deprecated. I have a short tutorial on PDO: http://xyluzcodes..com/2015/02/pdo-tutorial-series-6.html |
Re: Post your PHP Problems Here by xyluz: 8:27am On Mar 02, 2015 |
exellent91: Nice effort. But still room for improvement. |
Re: Post your PHP Problems Here by exellent91(m): 3:03pm On Mar 05, 2015 |
I need help from my fellow nairalanders, pls check this website, http://megadownloads.moreforum.com. I need help from every one of you to check my website and sign up because I need admins,(administrator) that will help me in running of the site. Or else the site will crash,plzzzzz, I need urgent help. Note: not just to checkout the website but also to sign up, so that I can be able to make you my admin,thanks. do this for a fellow nairalander cos we are like brothers.pls after signing up post on any of the threads to be made admin instantly |
Re: Post your PHP Problems Here by Dreyson69: 12:13am On Mar 06, 2015 |
Elvisten10:Cheap Non Hosted Google adsense for Sale at 10k with verification Pin.. Whatsapp me if interested @08035253041 |
Re: Post your PHP Problems Here by xyluz: 9:34am On Mar 06, 2015 |
Dreyson69: Can you explain what you mean by Google adsense? |
Re: Post your PHP Problems Here by Adesege(m): 8:49am On Mar 07, 2015 |
For standard, it is not advisable to use the mail() function. Not that it's deprecated but there are less to what to you can do with it. I'll recommend you use PHPMailer. With this, you can set headers, attach docs to mails and other great features. adewasco2k: |
Re: Post your PHP Problems Here by Adesege(m): 8:52am On Mar 07, 2015 |
It's usuall advisable to use the $_POST variable to send information to the server. PHPMailer should be recommended instead. Elvisten10: |
Re: Post your PHP Problems Here by Adesege(m): 9:05am On Mar 07, 2015 |
A sketch... You'll need a html form, with the action attribute pointing to where your php form processor page is. Leave blank if the code is on the same page as the html form or put <?php echo $_SERVER["PHP_SELF"]; ?>. Don't forget to use POST as the method. 2. On your processing page, get the values by setting variables to it. E.g $mail=htmlspecialchars($_POST["email"]); The "email" key should correspond with the name you set in your html form. Also don't forget to sanitize your input. You should have made a connection before now. Example code: <?php if(isset($_POST["submit"]) && $_POST["submit"] !==""{ include("db.php" //set your variables and sanitize $name=htmlspecialchars($_POST["name"]); $mail=htmlspecialchars($_POST["mail"]); $content=htmlspecialchars($_POST["content"]); //do necessary if else //insert into the db //if insert, send mail(); //echo message } ?> turl: |
Re: Post your PHP Problems Here by Adesege(m): 9:07am On Mar 07, 2015 |
Have you gotten a solution, if not, let me know so i can work out something for you blink182: |
Re: Post your PHP Problems Here by Adesege(m): 9:09am On Mar 07, 2015 |
I learnt it cost a fortune to enroll in that institution CODEEATER: |
Re: Post your PHP Problems Here by Nobody: 9:49am On Mar 07, 2015 |
Adesege:Ok, we solved it. Thanks. |
Re: Post your PHP Problems Here by Adesege(m): 9:51am On Mar 07, 2015 |
1 Like |
Re: Post your PHP Problems Here by kentc3: 3:55pm On Mar 09, 2015 |
Good Day Guys, Please i will want to play videos on my website, but do not want to make use of the HTML5 Video tag to do that.... i tried using jw player but the process of setting up the ftp and embedding in my web page and so on, seems to be cumbersome.... please i will love someone to assist me with other ways of achieving this .... thanks. anticipating your replies. |
Re: Post your PHP Problems Here by Adesege(m): 8:36pm On Mar 09, 2015 |
Try to take a look at jplayer or video.js. They are good plugin to achieve ur aim. kentc3: |
Re: Post your PHP Problems Here by Debeloved87(m): 9:39pm On Mar 09, 2015 |
how can i shorten posts on the main page of the blog, that viewers will have to view the whole post by clicking "continue reading" ? |
Re: Post your PHP Problems Here by kentc3: 10:51pm On Mar 09, 2015 |
Adesege: Owk... thank you very much, i will try it out... |
Re: Post your PHP Problems Here by ps3o(m): 1:06pm On Mar 11, 2015 |
Vijon:try editing the php file with notepad. that should solve the issue |
Re: Post your PHP Problems Here by ps3o(m): 1:46pm On Mar 11, 2015 |
Debeloved87: <?php $thepost="the whole as a whole"; $start=0; //0 is the first array position in the php. u can change it to whichever position you would want it to start displaying from the string $length=70 //depending on the no of strings u want to show from the post echo substr($thepost,$start,$length); ?> //constructed by Phemmy THE WEB DEVELOPER 07031175291 |
Re: Post your PHP Problems Here by Adesege(m): 6:36pm On Mar 11, 2015 |
Next time, it's advisable u post a sample code where u nid help. We can't work on abstract. Let's create a php function, so we can use it multiple times in our project. <?php function truncate($text, $chars =150, $terminator=' …'){ $cutPos = $chars - mb_strlen($terminator); $boundaryPos = mb_strrpos(mb_substr($text,0, mb_strpos($text,' ', $cutPos)),' '); return mb_substr($text,0, $boundaryPos ===false? $cutPos : $boundaryPos). $terminator; } ?> By default, the text will be truncated by 150chars and terminated by "...". You can edit the terminator variable to a link and the chars variable. Feel free to let me know if u encountered any problem. . EDIT:: USUAGE: truncate($text,"300","..." or truncate($text,"300","<a href='path/to/page'>some text" Debeloved87: |
Re: Post your PHP Problems Here by kobonaire(m): 3:16pm On Mar 12, 2015 |
I'm reading strings from an XML file, how can I check that the values are integers? |
Re: Post your PHP Problems Here by Adelekebalogun: 3:21pm On Mar 12, 2015 |
GET CHEAP DATA BUNDLES AT VERY LOW RATE MTN 300GB FOR 3000, AIRTEL 250gb FOR 3000, GLO 300GB FOR 3000, ETISALAT 300GB FOR 3000 call 07062471665 DATA WORKS ON ALL DEVICE BOTH MOBILE AND PC[color=#006600][/color] |
Re: Post your PHP Problems Here by Ilekeh(f): 3:28pm On Mar 12, 2015 |
Does anyone else use Lynda's PHP tutorials? |
Re: Post your PHP Problems Here by gdamola(m): 3:28pm On Mar 12, 2015 |
See Ojoro..Y will this thread be on Front Page?How does your php problems concern politicians?....Moderators.....Hmmmmmnnnn....Bribe is not good ooooooo.....Abeg no suspend me ooo..I no talk say u collect bribe oooo..... <?php echo "BRIBE IS NOT GOOD" ?> |
Re: Post your PHP Problems Here by GodMode: 3:30pm On Mar 12, 2015 |
gdamola: UNDEFINED ERROR: missing ; on line 7.. |
Re: Post your PHP Problems Here by silvernus0: 3:49pm On Mar 12, 2015 |
hi gurus, i knw how to set up a file image upload textbox to upload image to the database. after d image is uploaded to d database how do i call d image to show on a page e.g photos.php page wen it is viewd on d browser to see d images i uploaded to d db. tnks Gurus. |
Re: Post your PHP Problems Here by Adesege(m): 4:00pm On Mar 12, 2015 |
Please post a sample code. . . But u can cast the string into int using: . . $string=(int)$fetch["string"]; . Post a sample code kobonaire: |
Re: Post your PHP Problems Here by JackOfAllTrades: 4:02pm On Mar 12, 2015 |
GodMode:The code will run without errors. It just one line of code semi colon is optional |
(1) (2) (3) ... (14) (15) (16) (17) (18) (19) (20) (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. 64 |