Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,056 members, 7,953,192 topics. Date: Thursday, 19 September 2024 at 12:07 PM

Web Developers, I Need Ur Help! - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Web Developers, I Need Ur Help! (857 Views)

Hello Developers. I Want A Little Explanation Of How I Can Style My Html Documen / DHTML, Or Perhaps Other Developers, I Need You. / Web Developers Needed (2) (3) (4)

(1) (Reply) (Go Down)

Web Developers, I Need Ur Help! by Tosbi(m): 4:41pm On Jan 10, 2008
Hello guys, i seriously need ur help. i am currently working on a web project but one thing i notice and is giving me problem is the posting of forms in the web. using the post method for the form isn't working until i use the get method which is not good for privacy like for password fields. what can i do, is the problem from the settings @ d server or what? i need ur replies.
Thanks
Re: Web Developers, I Need Ur Help! by my2cents(m): 6:27pm On Jan 10, 2008
post your code (both front and back end) here so we can have a better understanding. When a blind man is guided by a blind man, what happens? wink
Re: Web Developers, I Need Ur Help! by smartsoft(m): 7:11pm On Jan 10, 2008
Yah post your Code
Re: Web Developers, I Need Ur Help! by Tosbi(m): 5:51pm On Jan 15, 2008
Hey guys, it's like you don't understand what i mean. i entered the code in the right way i should. infact when i used the GET method for the FORM. it all goes on well. But when it comes to using POST as the method for the FORM, it sends empty variables. we all know it is wrong to use the GET method for a password form. So, is the problem from the settings at the php.ini file? both on my web host and on my pc, it kept on repeating same result. Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Re: Web Developers, I Need Ur Help! by Nobody: 2:36pm On Jan 16, 2008
@tobsi

Listen to urself
"i entered the code in the right way i should"

why is it not working then
Why scared to paste the code here, no one will be able to help without seeing the code

e.g. with PHP, you might be trying to use $_GET['fieldname']
to retrieve the submission when $_GET only works with the get method
You will need to use $_POST['fieldname'] for a post method or $_REQUEST['fieldname'] to be on the safe side.
Re: Web Developers, I Need Ur Help! by Tosbi(m): 3:04pm On Jan 16, 2008
Thanks for the response. I used that exact code but it's still the same thing. both the $_REQUEST['fieldname'] and the $_POST['fieldname'] . but when i use $_GET['fieldname'] it works right. i am so confused
Please help
Re: Web Developers, I Need Ur Help! by my2cents(m): 3:19pm On Jan 16, 2008
i guarantee u won't be confused after you post your code. So post it!!
Re: Web Developers, I Need Ur Help! by Nobody: 4:14pm On Jan 16, 2008
post it or stay confused.
Re: Web Developers, I Need Ur Help! by Bossman(m): 6:20pm On Jan 16, 2008
Or at least post the relevant portiosn of the code. Yes, we all know that GETappends any paramaters to the end of the URL, and POST does not. If POST is not working for you, you are obviously NOT doing something write.
Re: Web Developers, I Need Ur Help! by Tosbi(m): 12:55pm On Jan 19, 2008
ok, here is the sample of the code

<form method="post" action="standard_login.php">
Username:<input type="text" name="username">


Password:<input type="password" name="password">


<button type="submit" name="submit" value="submit">


</form>

Now it still echos empty variables with the post method but goes well with theget method. what is ur suggestion?
Re: Web Developers, I Need Ur Help! by my2cents(m): 1:36pm On Jan 19, 2008
tosbi,

1) this is the form's HTML code and not the PHP that processes this code. May we take a look at that as well?

2) This probably won't work but try replacing "button" with "input". Again, this might not work. Just thinking out loud

3) Don't forget to post your processing code.
Re: Web Developers, I Need Ur Help! by Tosbi(m): 6:44pm On Jan 19, 2008
standard_login.php

<?php
//get variables
$username=$_POST['username'];
$password=$_POST['password'];

//echo the variables to know if they are available
echo "$username";
echo "$password";

?>

that is it.
Re: Web Developers, I Need Ur Help! by my2cents(m): 9:31pm On Jan 19, 2008
what can i say? it beats me. Off the top of my head, I would like u to do the following:

1) modify your processor code to say something like: echo "first name is: ". $username;

2) paste the URL of the site where this form resides.

I want to enter some values and see for myself what is going on if you don't mind (view source, etc). I would have said you should use "REQUEST_" but from abv it appears you have done that already.

In the event no one else can find what is wrong with your code, I will be waiting for that URL.
Re: Web Developers, I Need Ur Help! by Nobody: 12:11am On Jan 20, 2008
Your codes are perfect, just that i wont like you to form the habit of putting your variables in double quotes for no reason

Tosbi:


echo "$username";
echo "$password";



get used to doing it like this


my2cents:


1) modify your processor code to say something like: echo "first name is: ". $username;


i GUESS one of the reasons why we had to beg you to paste this code is because the codes you have there with you is much and you don't want to paste everything. fine, its ok

but check this out, maybe due to extensive copy and paste, you have nested a form tag within another like below


<form action="standard_login.php">

some codes here


<form method="post" action="standard_login.php">
Username:<input type="text" name="username">


Password:<input type="password" name="password">


<input type="submit" name="submit" value="submit">


</form>

the first one is used by the browser so look thru ur codes. if thats not the problem

Then someone else will help you out or you paste all the codes
Re: Web Developers, I Need Ur Help! by my2cents(m): 12:13pm On Jan 20, 2008
webdezzi,

which is y I asked that he give us the URL to his site so we can analyze the source wink

tosbi:
I almost forgot, please, after you echo the variables, pls put an "exit;" statement so that the form doesn't get processed. At this point, I would like to know if the variables are getting passed at all in the first place. so your code would look like so:

"first name is: ". $username . " and last name is: " . $password;
exit;

we are still waiting.

(1) (Reply)

Barter: Design My Wsite, I Teach U 3d Animations/professional Videoworks / Is Your Website Designed To Suit Its Function? / My Adsense Cheque

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