Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,638 members, 7,813,116 topics. Date: Tuesday, 30 April 2024 at 07:21 AM

Post your PHP Problems Here - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Post your PHP Problems Here (63282 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) (4) (5) (6) (7) (8) (9) (10) ... (20) (Reply) (Go Down)

Post your PHP Problems Here by Elvisten10(m): 11:13am On Oct 01, 2013
Hello,

If You need help or request solutions to problems on php, kindly post on this thread.

No matter how simple or complex it is, people are here to help.

Happy Coding smiley

3 Likes 1 Share

Re: Post your PHP Problems Here by spikesC(m): 11:20am On Oct 01, 2013
I have some problems with PHP. I feel like i'm writing too much codes sad

I wanna start writing 1 line 1 project codes....can u pls help grin
Re: Post your PHP Problems Here by Elvisten10(m): 11:29am On Oct 01, 2013
spikes C: I have some problems with PHP. I feel like i'm writing too much codes sad

I wanna start writing 1 line 1 project codes....can u pls help grin
When someone says "I want a
programming language in which I need only say what I wish done," give him a lollipop.
Alan Perlis ACM-
SIGPLAN '82,
Epigrams in
Programming http://en.m.wikiquote.org/wiki/Programming_languages
thats similar to what you want, go get a lollipop.

3 Likes

Re: Post your PHP Problems Here by sisqology(m): 12:05pm On Oct 01, 2013
Tshw

3 Likes

Re: Post your PHP Problems Here by spikesC(m): 12:37pm On Oct 01, 2013
Elvisten10: thats similar to what you want, go get a lollipop.
Re: Post your PHP Problems Here by CODEEATER(m): 1:06pm On Oct 01, 2013
Lol...

M I allowed to talk on frameworks?

Did MVC thing hasn't been fully installed in my system(brain)...
Re: Post your PHP Problems Here by sisqology(m): 1:50pm On Oct 01, 2013
CODE-EATER:
Lol...

M I allowed to talk on frameworks?

Did MVC thing hasn't been fully installed in my system(brain)...


Which of them? I can help
Re: Post your PHP Problems Here by CODEEATER(m): 2:14pm On Oct 01, 2013
sisqology:


Which of them? I can help
Hmvc is modular mvc so I guess its best we start from MVC...

And as 4 framework, codeigniter or yii would do
Re: Post your PHP Problems Here by sisqology(m): 3:58am On Oct 02, 2013
CODE-EATER:

Hmvc is modular mvc so I guess its best we start from MVC...

And as 4 framework, codeigniter or yii would do



Cake joh! :-P
Re: Post your PHP Problems Here by adewasco2k(m): 12:40pm On Oct 02, 2013
I think this should be in programming section!
Re: Post your PHP Problems Here by dhtml(m): 3:06am On Oct 03, 2013
You boys are jokers, in fact the thread title sef get as e be.
Re: Post your PHP Problems Here by brucebanner: 7:39am On Oct 03, 2013
adewasco2k: I think this should be in programming section!
Seconded
Re: Post your PHP Problems Here by Sejj(m): 7:26pm On Oct 03, 2013
Hey my bosses, am not a professional web designer but i created a website using a WYSIWYG software (Easy Website Pro). Please how do i make my contact form work cos i know it is PHP based.
Re: Post your PHP Problems Here by Yinksey(m): 8:24pm On Oct 03, 2013
Sejj: Hey my bosses, am not a professional web designer but i created a website using a WYSIWYG software (Easy Website Pro). Please how do i make my contact form work cos i know it is PHP based.

I think this link answers your request.
www.phpeasystep.com/phptu/8.html
Re: Post your PHP Problems Here by adewasco2k(m): 8:36pm On Oct 03, 2013
Sejj: Hey my bosses, am not a professional web designer but i created a website using a WYSIWYG software (Easy Website Pro). Please how do i make my contact form work cos i know it is PHP based.

Read up php function mail()

Also you should know about forms and POST/GET
Re: Post your PHP Problems Here by OmerianConsult: 9:23pm On Oct 03, 2013
Hello techies,
l also want to be deft in web dev. Pls help me with books, videos and tutorials on various aspects of d biz including photoshop. Pls send them to omerianconsult@gmail.com. Greater exploits!
Re: Post your PHP Problems Here by Elvisten10(m): 9:43pm On Oct 03, 2013
Omerian Consult: Hello techies,
l also want to be deft in web dev. Pls help me with books, videos and tutorials on various aspects of d biz including photoshop. Pls send them to omerianconsult@gmail.com. Greater exploits!
www.homeandlearn.co.uk www.tizag.com www.tutorialspoint.com www.php.net . You can also use youtube.
Re: Post your PHP Problems Here by Elvisten10(m): 9:56pm On Oct 03, 2013
Sejj: Hey my bosses, am not a professional web designer but i created a website using a WYSIWYG software (Easy Website Pro). Please how do i make my contact form work cos i know it is PHP based.
all you need to know to achieve this is HTML FORM, PHP $_GET OR $_POST VARIABLES (ARRAY) AND PROBABLY THE PHP MAIL() FUNCTION. You write the html form and put the contact php script name as the value for the action attribute, then you get the submitted data with the $_GET or $_POST variables and probably send it to your mail using the mail function.
Re: Post your PHP Problems Here by Yinksey(m): 9:29am On Oct 04, 2013
how can this code be improve.

/*
* convert datetime to UNIX timestamp
* @param $time date time formatted time
* which will be converted
* @return UNIX timestamp format for the
* supplied time
*/
function to_unix($time) {
// divide the the time into two sections date
//and time
$expl = explode(' ',$time);
//explode the date
$year = explode('-',$expl[0]);
//explode the time
$time = explode(':',$expl[1]);
// convert it into Unix timestamp using mktime function
$unix = mktime($time[0],$time[1],$time[2],$year[1],$year[2],$year[0]);
//return the new time.
return $unix;
}
$time = '2013-10-28 12:00:00';
echo to_unix($time);
Re: Post your PHP Problems Here by turl(m): 9:43am On Oct 04, 2013
Elvisten10: all you need to know to achieve this is HTML FORM, PHP $_GET OR $_POST VARIABLES (ARRAY) AND PROBABLY THE PHP MAIL() FUNCTION. You write the html form and put the contact php script name as the value for the action attribute, then you get the submitted data with the $_GET or $_POST variables and probably send it to your mail using the mail function.

Thought I would also be needing to add some database info. Guess I need to read up the whole tut. I got frustrated after the codes just stopped making sense and gave up. Thanks.
Re: Post your PHP Problems Here by Nobody: 10:07am On Oct 04, 2013
Please I need script that will make this form work. Thanks

http://ormedsupremeoption.com/new_distributor.html

I want it to mail the fields in the form to the company email
Re: Post your PHP Problems Here by adewasco2k(m): 11:02am On Oct 04, 2013
blink182: Please I need script that will make this form work. Thanks

http://ormedsupremeoption.com/new_distributor.html

I want it to mail the fields in the form to the company email

The whole form details is saved into an array either $_GET or $_POST.

Either field items can be identify by the form's name for example the text field with name, you can have in the input tag name='agent_name'

Then to acess that name you will either have $_POST['agent_name'] or $_GET['agent_name']

The above will hold anything that is typed into the input field called agent_name.

So that's how to handle the form.

To send the form, you can format your content then use the mail() function.

Also you might want to read more about which is best POST or GET but for now just know POST is more secure and you should use it, but there are cases where you just have to use GET
Re: Post your PHP Problems Here by Nobody: 11:40am On Oct 04, 2013
adewasco2k:

The whole form details is saved into an array either $_GET or $_POST.

Either field items can be identify by the form's name for example the text field with name, you can have in the input tag name='agent_name'

Then to acess that name you will either have $_POST['agent_name'] or $_GET['agent_name']

The above will hold anything that is typed into the input field called agent_name.

So that's how to handle the form.



To send the form, you can format your content then use the mail() function.

Also you might want to read more about which is best POST or GET but for now just know POST is more secure and you should use it, but there are cases where you just have to use GET
Thanks for the speedy reply but I know nothing about php programming. I totally undestand the POST and GETpart
Re: Post your PHP Problems Here by adewasco2k(m): 12:05pm On Oct 04, 2013
blink182: Thanks for the speedy reply but I know nothing about php programming. I totally undestand the POST and GETpart

Do you want to do it or somebody do it for you?

If you want to do it then you must know php a bit.

Currently the form is just static?

There is no way anybody can help you do it here, we don't have details of the form.

So just learn arrays and how to get its contents, learn forms and the mail() function then you will achieve this with no hitch
Re: Post your PHP Problems Here by CODEEATER(m): 12:10pm On Oct 04, 2013
M starting my NIIT course really soon...

Just 4 cert sake... according to wat I hear dey don't teach much
Re: Post your PHP Problems Here by Nobody: 12:17pm On Oct 04, 2013
adewasco2k:

Do you want to do it or somebody do it for you?

If you want to do it then you must know php a bit.

Currently the form is just static?

There is no way anybody can help you do it here, we don't have details of the form.

So just learn arrays and how to get its contents, learn forms and the mail() function then you will achieve this with no hitch
What details of the form do you need to help you do it?
Re: Post your PHP Problems Here by Ymodulus: 12:19pm On Oct 04, 2013
Yinksey: how can this code be improve.

/*
* convert datetime to UNIX timestamp
* @param $time date time formatted time
* which will be converted
* @return UNIX timestamp format for the
* supplied time
*/
function to_unix($time) {
// divide the the time into two sections date
//and time
$expl = explode(' ',$time);
//explode the date
$year = explode('-',$expl[0]);
//explode the time
$time = explode(':',$expl[1]);
// convert it into Unix timestamp using mktime function
$unix = mktime($time[0],$time[1],$time[2],$year[1],$year[2],$year[0]);
//return the new time.
return $unix;
}
$time = '2013-10-28 12:00:00';
echo to_unix($time);

this is an easy way
---------------------------
$datetime = '2012-07-25 14:35:08';

$unix_time = date('Ymdhis', strtotime($datetime ));
echo $unix_time;
------------------------------

OR

---------------------------------
$datetime = '2012-07-25 14:35:08';

$unix_time = date('Ymdhis', strtotime($datetime ));
echo $unix_time;
----------------------------
Re: Post your PHP Problems Here by Yinksey(m): 2:14pm On Oct 04, 2013
Ymodulus:

this is an easy way
---------------------------
$datetime = '2012-07-25 14:35:08';

$unix_time = date('Ymdhis', strtotime($datetime ));
echo $unix_time;
------------------------------

OR

---------------------------------
$datetime = '2012-07-25 14:35:08';

$unix_time = date('Ymdhis', strtotime($datetime ));
echo $unix_time;
----------------------------

that you code is not right o, when the was converted into date time it was not the same with what you converted, it yield 1932-01-29 15:09:08 which is wrong.
Re: Post your PHP Problems Here by Elvisten10(m): 3:29pm On Oct 04, 2013
Yinksey: how can this code be improve.

/*
* convert datetime to UNIX timestamp
* @param $time date time formatted time
* which will be converted
* @return UNIX timestamp format for the
* supplied time
*/
function to_unix($time) {
// divide the the time into two sections date
//and time
$expl = explode(' ',$time);
//explode the date
$year = explode('-',$expl[0]);
//explode the time
$time = explode(':',$expl[1]);
// convert it into Unix timestamp using mktime function
$unix = mktime($time[0],$time[1],$time[2],$year[1],$year[2],$year[0]);
//return the new time.
return $unix;
}
$time = '2013-10-28 12:00:00';
echo to_unix($time);
use the strtotime() function www.ideone.com/Ev0uKg www.ideone.com/Z9fh1S
Re: Post your PHP Problems Here by Elvisten10(m): 3:36pm On Oct 04, 2013
Yinksey: how can this code be improve.

/*
* convert datetime to UNIX timestamp
* @param $time date time formatted time
* which will be converted
* @return UNIX timestamp format for the
* supplied time
*/
function to_unix($time) {
// divide the the time into two sections date
//and time
$expl = explode(' ',$time);
//explode the date
$year = explode('-',$expl[0]);
//explode the time
$time = explode(':',$expl[1]);
// convert it into Unix timestamp using mktime function
$unix = mktime($time[0],$time[1],$time[2],$year[1],$year[2],$year[0]);
//return the new time.
return $unix;
}
$time = '2013-10-28 12:00:00';
echo to_unix($time);
use the strtotime() function www.ideone.com/Ev0uKg www.ideone.com/Z9fh1S
Re: Post your PHP Problems Here by Yinksey(m): 8:52pm On Oct 04, 2013
Elvisten10: use the strtotime() function www.ideone.com/Ev0uKg www.ideone.com/Z9fh1S

finally somebody got it right. elvis thats very good of you, just trying to make somebody learn!.

1 Like

Re: Post your PHP Problems Here by CODEEATER(m): 10:11am On Oct 05, 2013
My advice to u all

2 Likes

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (20) (Reply)

Add More Than One Website Url To Your Twitter Account. / Top Google Searches By Nigerians 2015;Arsenal,Buhari,Diezani Arrest tops d list. / Mark Zuckerberg Eating Pounded Yam And Eforiro (Photo)

(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. 42
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.