Passing Sessions

Codes here !

Moderators: macek, egami, gesf

smi4motion
New php-forum User
New php-forum User
Posts: 13
Joined: Mon Apr 02, 2012 7:39 am

Passing Sessions

Postby smi4motion » Sun Apr 29, 2012 12:47 am

I am trying to pass a session from one page to another. Here is my issue.

I have an index page that has a list of projects on it. I want to be able to click on the update link to update the desired project. Once the update has been done, it will update the database with the correct information.

I have created the index.php page that reads the database info correctly. You can see the site and code at.
http://www.streethawk-fcs.com/client/index.php

Then when you click on the update button on that page, it calls the information from the database, but when you make the changes it does not save the new updated info to the database. Im thinking it has to do with session problems.

Can someone please look over my site pages and tell me what I am doing wrong.

Thanks
William

User avatar
minimihi
New php-forum User
New php-forum User
Posts: 238
Joined: Sat Apr 14, 2012 11:57 am
Location: Vilnius, Lithuania

Re: Passing Sessions

Postby minimihi » Sun Apr 29, 2012 9:36 am

<form id="FormName" action="updated.php?id=id" method="post" name="FormName">

Care to check this out? :?

smi4motion
New php-forum User
New php-forum User
Posts: 13
Joined: Mon Apr 02, 2012 7:39 am

Re: Passing Sessions

Postby smi4motion » Sun Apr 29, 2012 8:55 pm

I have changed to code to:
<form id="FormName" action="updated.php" method="post" name="FormName">

At this point I have checked to see if the variable is being passed from the previous page, and it is not.

I select the client I want to update at http://www.streethawk-fcs.com/client/index.php
then at that point "id" is passed to the following page where I will update the client info at http://www.streethawk-fcs.com/client/update.php?id=2 at this page I make the change I want and then I submit the form which calls this page http://www.streethawk-fcs.com/client/updated.php and although it says successful at the update when I check the database the clients information was not updated.

Please help. Im new at all this and am learning as I go. Thanks.

User avatar
minimihi
New php-forum User
New php-forum User
Posts: 238
Joined: Sat Apr 14, 2012 11:57 am
Location: Vilnius, Lithuania

Re: Passing Sessions

Postby minimihi » Mon Apr 30, 2012 3:19 am

How are you passing item ID from second form to form submission?

smi4motion
New php-forum User
New php-forum User
Posts: 13
Joined: Mon Apr 02, 2012 7:39 am

Re: Passing Sessions

Postby smi4motion » Mon Apr 30, 2012 11:25 am

$id=$_REQUEST['id'];

You can see the source code for all pages if you like.
(page i use to select the account) http://www.streethawk-fcs.com/client/index.php
(page i use to input update) http://www.streethawk-fcs.com/client/update.php?id=1
(page i use to process update) http://www.streethawk-fcs.com/client/updated.php

Thanks for all your help. So frustrating trying to figure out and learn at same time.

User avatar
minimihi
New php-forum User
New php-forum User
Posts: 238
Joined: Sat Apr 14, 2012 11:57 am
Location: Vilnius, Lithuania

Re: Passing Sessions

Postby minimihi » Mon Apr 30, 2012 11:50 am

Now take a look at those pages and tell me. Where do you see PHP SCRIPT? :-x
THIS IS PHP forum, THIS IS probably PHP PROBLEM and THAT ISN'T PHP SOURCE CODE

I checked what data is passed between the pages and didn't see anything what would indicated what order is updated when passing data from update.php to updated.php.
That's all I can tell from what you gave me.


Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 3 guests