Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





$_SESSION[] Not Holding Data After Submitting The Data


I'm using $_SESSION[] to store some information, but after I submitted the data using form, the data stored in $SESSION[] disappeared. What could be the reason? Code:




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Submitting Data
I have a table which consists of 20 items. each row also has a dropdown menu so i can change the price of these items. These dropdown menus all have the name of the position which it appears in the table.

so for example the dropdown menu which is 4th in the table will have the name = 4. Im trying to work out how i can build script which will only submit the variables where there has been a change in the price. Code:

View Replies !   View Related
Submitting Data Through Query
I have a query which takes data submitted from a form and puts it into a database. I have done this multiple times before and have gotten it to work but when i tried to do it this time i am getting errors. At first, the code wouldn't add the data to the DB, so i put in mysql_error(); and it came back with:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update, url, sp, favitem, favperson, ip, comments) VALUES('eee', 'eeeeeeeeeeeeee' at line 1

The code i have written is:

"INSERT INTO addtodb(subetauser, email, update, url, sp, favitem, favperson, ip, comments)
VALUES('" . $username . "', '" . $email . "', '" . $update . "', '" . $url . "', '" . $sp . "', '" . $favitem . "', '" . $favperson . "', '" . $theip . "', '" . $comments . "')" or DIE("Error with query variable");
$result = mysql_query($query) or die(mysql_error());

Any help as to what the problem could possible.

View Replies !   View Related
Submitting Data To HTML Forms?
Could someone please suggest the basic steps I need to take to automatically
submit a set of data to an online form using PHP? These are basic HTML forms
with text fields and option lists, and the form method is Post. I would like
to automate the submission process. Do I need to set up a dummy form on a...

View Replies !   View Related
Problem Submitting Data To Database
i am trying to do something most of you might find real simple i have set my database up correct and am trying to add a bit of info to it, read around the net but can't find my problem, can you help? Code:

View Replies !   View Related
Submitting POST Data Without FORM
I have a form that routes to a PHP script that sends an email. I have this set up fine, but here's the tricky part:

I need to then have it send the same variables to a third-party script that will only accept POST variables, so the get method is out of the question.

View Replies !   View Related
Creating A Record By Submitting Data From
I am creating a record by submitting data from a form by doing usual PHP Code:

INSERT INTO myTbl_1 (item) VALUES ('$newItem')

When a record is created a unique ID is assigned to that row. Now I also need to update myTbl_2 with that new Unique ID that was assigned to the new line entry. It am trying to accomplish it without adding extra steps, like clicking additional buttons.

View Replies !   View Related
Users Submitting Data Should Be Numbers Only
I have users submitting data, and for one field I need to strip everything out, leaving only numbers remaining. What is the best way going at this?

View Replies !   View Related
Submitting Data To A Basic Form
I am learning PHP/MySQL using "..for Dummies" book and the author seems to lose me in certain examples. Code:

View Replies !   View Related
Eliminate The Manual Process Of Actually Submitting The Data.
I'm looking for resources on how to use PHP (or if there are better
tools for this than PHP) to access a web page. Login, fill in some form
data and send a file. Since our system generates all the data we upload
via a automatic process I'm trying to eliminate the manual process of
actually submitting the data.

View Replies !   View Related
Submitting Data To Database And Sending An Email At The Same Time
I have a form which when completed submits data to a mySQL database. This all works fine.

<form method="post" name="form1" action="<?php echo $editFormAction; ?>">

lots of other form related staff, then, PHP Code:

<input type="submit" class="visitortextnormal" value="Insert record">

The current action reads: PHP Code:

View Replies !   View Related
Losing $_SESSION Data
I just upgraded to PHP 4.3.3 tonight with easyphp 1.7, and now I've got several problems, don't know really why.

I don't think this is related to register globals being set to OFF, as I had already turned them off in my previous version. mayve it comes from something else, but right now this bug is reall driving me crazy. i've got a login when the user logs, got something like that: file login.php PHP Code:

View Replies !   View Related
$_SESSION['data'] Not Being Deleted?
I got a login script that basically does that: checks wether username and password is in a mysql file and then sets the variable loged_in to 1 like that PHP Code:

View Replies !   View Related
$_SESSION Data Lost.
If i store a variable in the session eg: $_SESSION['something'] it is lost between page changes. Is this normal? Is there a way round this?

View Replies !   View Related
Uploading Form Data Then Submitting Form To Payment Site
how to submit a form to update its contents to a db and then from the page the form is submitted to then submit another form which is the payment processing data for a site such as paypal?

At the moment im having to have users submit the form and then click a button on successful submission to take them through to payment processing and i would like to streamline this process to just require the submission of the details form.

View Replies !   View Related
Simulate Send Data With POST And Get Data From A Web Page (whith A Session)
I'd like to get text of a webpageB that I reach by putting
a login and a password in a webpageA.

I mean:
I'd like to get text of a WebPageB with a php script.
But before I can see WebPageB I have to autenticate myself
in a WebPageA writing my login and my password in a form,
the host recognise me and (by session) let me see the WebPageB.

The question is:
1)how to simulate send data (login an password) in form with a PHP script?
2)how to navigate in a Web usin the same session?

View Replies !   View Related
Pull Data From Mysql From A Varchar Field With Comma Seperated Data
I'm trying to pull data from mysql from a varchar field with comma seperated data, like: test, test, test, and so on. when I try to display the data i just get "array" in the input field. what i'm wondering is how can I show the data correctly? I'm a little lost here.

View Replies !   View Related
Problems With Reading Data From A Text File And Inserting The Data Into DB
Ive been having problems getting this to work for 3 days now. Basically what im trying to do is read from a text file and insert the information into mysql. The text file is in this format:

"LuCyndi@infiniti.com","carol","kellerhals","109 veeder dr","las vegas","NV","89128","702-254-2061","45"
"the_prophet@att.net","a.","cohen","6794 e. bonanza rd","las vegas","NV","89110","702-463-6569","55"

I understand how to open files to read but im having problems turning each set of data into an array so i may insert it into mysql. If someone could please help it would be appreciated.

View Replies !   View Related
Retrieve A Data From My MySQL Database Using PHP And Save The Data In A Variable
How can I retrieve a data from my mySQL database using PHP and save the data in a variable in in my PHP code for example i have this table in the database

First name           Last Name
   Juan                  Punkista

I would like to store 'Juan' in variable $first and 'Punkista' in variable $last.

View Replies !   View Related
Is It Data From The TEST Or From PROD And Will It Be Data From Database1 Or From Database 2?
<?php

I have a question about 2 connection strings to a ms sql database.

# TEST DATABASE

$connecttest = MSSQL_CONNECT("TEST", "sa", "123456") or exit("Unable to
connect to MS SQL Server at 10.0.10.58");

$select = mssql_select_db ("database1",$connecttest) or exit("Unable to
select database TEST");

# PRODUCTION DATABASE

$connectprod = MSSQL_CONNECT("PROD", "sa", "654321") or exit("Unable to
connect to database at 10.0.10.59");

$select = mssql_select_db ("database2",$connectprod) or exit("Unable to
select database PROD");

$SQL = "SELECT * FROM table1";

$RESULT = mssql_query($SQL);

// What data will i find here? Is it data from the TEST or from PROD and
will it be data from database1 or from database 2?

?>

View Replies !   View Related
Use Sessions To Store Data And Use That Session To Get Query Data.
We have some Java programmers in our software dev, and they are
pressuring us to use Sessions to store data and use that Session to get
query data. They say that it is ok since it is like Entities in Java. I
am baffled as a .NET programmer, we tend to avoid using sessions and
instead use DataSet, is there any equivalent of dataset in PHP?

View Replies !   View Related
To Update Data - Reqiures Verify Existing Data?
i have a table with 7 writable fields. i've already populated column1 w/ data. so, 6 fields in each row need updating.

the data in field #1 is a "unique identifier" code, but not the auto_increment field, and therefore should NOT be updated along with its row's neighboring cells.

this "unique Identifier" column is used as a human-friendly reference-point for sifting through records in the table via HTML select dropdown box, and its value should remain static once entered into the db. Code:

View Replies !   View Related
Using MS Access To Hold The Data And PHP To Collect The Data From The Database
I am using MS Access to hold the data and PHP to collect the data from the database and display it on a website. I've got the results displaying in the normal way with data being displayed in a linear manner e.g. Code:

View Replies !   View Related
Comparing Data In Two Tables To Find Missing Data
I have a small web site where people can register and create an account, and then add links to our site.

I have two tables set up. One holds registration data -- user_id, username, password, date registered. The other holds link data -- link_id, user_id (to track which registrant added which link), and URL.

Some people have created an account, but have never posted a link. I'd like to figure out who those folks are but I'm not quite sure about how to do that.

If I did this manually I would get a list of user id's from the registration table and then look at the link table and check off user id's in that table. The unchecked user id's are my target group.

View Replies !   View Related
Comparing Form Data To Mysql Data
Im interested in building a script that would take form data, a variable like an address, and compare it with a known address in a mysql table (called addresses), then if there is a match log the address information in a separate table called (addresslog), and return the visitor to a certain page. If there is no match between the address entered in the form and known addresses then the information is still logged into the addresslog database but the visitor will be sent to a different page.

I'm still new to this, and am working through the logic and the syntax, but I believe I'm close. It's still not working, I have all of the proper tables, maybe I'm way off with the coding so I thought I would seek out some expert advice. Here's the entire script with as much explanation as I could give. PHP Code:

View Replies !   View Related
Data Type Change Without Loosing Data
I have a problem in mysql. I stored a date in  08/14/2006 format and choose a datatype longtext now i want to store date in 2006-08-14 form is it possible to do it without loosing data in db when i convert datatype longtext to date the data lost. Any solution?

View Replies !   View Related
Showing Data From Data In Specific Interval
i will make a banner system to my website. there is some information in the database i get out with to my site. that is pasteing the data in random way. i have a date with day-month-year and a time .. hour:min. how do i do in my code so its is displayed in ex 1 month from that day it is acceptet. give me an example to how i could do it.

View Replies !   View Related
Data Mining / Data/Website Scraping
I'm looking for a piece of software or coding that will let me post a
form
to another URL, accept the response, search it for a specific
"success"
string and then let me continue processing the rest of my program.

I want to accept queries on behalf of my supplier, forward it to them
behind
the scenes, accept their response and display it within my website.

Has anyone had any experience with this? Is there a simple, basic
utility
to let me do this?

I was kind of hoping I could avoid developing it myself.

View Replies !   View Related
Possible To Pass And Display The Data Before Some Of Data In Processing?
possible to display the data before some of the data still in processing in server?

I had one page that peform the calculation with more that ten calculation of huge numeric of data and compare between each other. when the user insert all the data and pass to the server, isnt possible we display other data to the user and after the compare process had finish just display the result to the user?

possible to do that? other had other more efficient way to do that?

View Replies !   View Related
How To Trim Data , Data Retrived From Mysql
I am retriving data from MySql database into table.. the width of the table is 281 so small so i wanted to cut the text say eg. : Today Mr. X-Men is visiting Thimphu for his lates show off movie traillers. I wanted to trim it in this formate : Today Mr. X-Men is visiting Thimphu for ... The rest of the data i can hyperlink this sentence and show it in the another page.. Just like the Yahoo News for ur kind information.

View Replies !   View Related
Pull The Data Directly From A Data Feed
I am currently building a site that would be easier if i could pull the data directly from a data feed. ButI'm new to PHP and I don't know how to create a bit of script to do this.

View Replies !   View Related
Trouble Appending Data Onto The End Of Form Data
I have a textarea in an html form. Users list items in it.

item1
item2
item3

I then process the form data in php so that a "-" is appened at the beginning and end of each line. Code:

View Replies !   View Related
Extracting Data And Syncing Data From 2 Different Databases
Here is my problem. I need to sync up data from 2 separate databases. The data in the first database is stored in one column, here is an example of the data: 3214, 3478, 3100
These number are the idProduct Primary Key from the Products table of the second database.

I need to separate the numbers the coma is the delimiter. each 4 digit number is a different product number from the second database. The site is currently done in ASP and access database. I converted the databases to mySQL and redoing the site in PHP. Code:

View Replies !   View Related
Delete Data From The Data Base
Im doing the PHP-MYSQL program to search the data in the database and display on the HTML Page. Everything is working fine till now. Now I want to know that, how to write program to delete the searched and displayed data from the database.....

I know the MySQL Syntax to delete data from database...Im not asking about MySQL programming. I want just an idea, how to do the delete process. Here is My full PHP script, Code:

View Replies !   View Related
Comparing Database Data And New Data
I am trying to create a PHP script that reads in a file, parses it for the data I want and compares it to the data I have in a database.

The data is points and ranking information for a Folding@Home Team.  Every week someone creates a news item with points gained by each team member for that week and other info.  This is done manually and takes a lot of time.  I hope for my script to automate as much of it as possible.

The script was to run as follows:

Download and parse latest statistics into 2D array
Compare usernames in array to usernames held in Database
Any new usernames and their respective points/rank to be added to database

Compare points in 2D array of each user to those held in database.
Output username and points gained

I thought I had a working script until I actually tested it on real data, and realised I missed something rather obvious - the order of usernames from the parsed file is not going to be the same order as in my database - due to people moving up and down the ranks.  So i can't just get a recordset from the db and run a simple loop to compare it to the parsed data.

I am not sure how to go about comparing the database information with the parsed data that works around the fact the data could be in any order.  The only thing i can think of is:

foreach item in $parsed_data_array
    query database for $parsed_data_array=>username
        if(number of results == 0)
          build new insert query for current username
        else
          continue

I don't know if this works [haven't tested yet] but I can't help feel it is a little DB intensive.  There could be up to 200 queries being sent to the database.  This can be minimized by adding extra criteria, like ignoring inactive users of course.  Is this a viable solution or is there a much better way of doing this?

View Replies !   View Related
Retreiving Data And Maintaining Data
I am trying to add data to a table in oracle but get

Warning: ociexecute(): OCIStmtExecute: ORA-00936: missing expression in /homedir/ilex-s02/mrace/public_html/addnewemp.php on line 18

here is the PHP script i am working with, Can anyone see any faults with it? Code:

View Replies !   View Related
Retrieving Data - Strip The Data
This shouldn't be a complicated solution but it's somehow beyond me at the moment. There is a php script on an external server that is writing javascript document.writes that we are supposed to include in our html files.

However, we don't like the layout so I'm trying to strip the data we don't (shouldn't be a problem) but for something reason I can't get php to read it. It's not a php problem, it's just I'm doing the wrong things.

I tried

$sitedata = include("link.to.file");
echo $sitedata;

That didn't work. What's the right way of getting the data into a php variable so I can begin editing it?

View Replies !   View Related
Grouping Like Data While Looping Through Other Data
I have a mysql query that returns quite a bit of data that I need formatted and displayed in a web browser. While I can get each row displayed on it's own with a while loop, I need to group the redundant data while still showing the relevant per line data in each group. Code:

View Replies !   View Related
How To Insert Data Into One Form ,the Form Include 2 Table Data In Database
i had create a form and i want to insert the data, but my form was include the data from 2 table , wat will be the query looked like, can somebody give me the example ? How to do it?

View Replies !   View Related
Save Form Data - How To Temporarily Store The Form Data Of Page 1
i have separated a form into 3 separate php pages as step 1, step 2 and step 3. i would like to know how to temporarily store the form data of page 1 when the user is moving onto page 3 after completing form 2 on page 2?? then retreive and send the data of all 3 forms together in one email to the webmaster when the user clicks submit on page 3 after completing the 3rd form as well as the previous 2.

View Replies !   View Related
Preserving Form Data Prior To Processing The Form Data.
I have a form that will be preserving form data prior to processing
the form data. Upon clicking a certain submit button you will go to
another PHP script that will contain the following code:

View Replies !   View Related
Get The Data From Those Rows That Have Data
Hi Guys,
If i were to have the following php query:


$query = "SELECT * FROM alist WHERE list_id = $id";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo "<b>{$row['List_Name']}</b><BR>";
echo "{$row['address']}, {$row['state']}<BR>{$row['post_code']}<BR>Tel: {$row['phone']}<BR><BR>";
echo "{$row['Info']}<BR>";
echo '</blockquote>'

....how can i get the data from those rows that have data.
For example, some rows won't have a 'phone' value so i don't want this to display "Tel: " if there is no value associated with 'phone'.
What do i need to add to my script inorder to achieve this?

Thanx...

View Replies !   View Related
Posting Form Data And Also Allow To Download Form Data
i have a client that whats to post form data to a database but he also wants users of the script to download it aswell how will i got about doing this i thought about it that i could make it save it into a txt file then echo the download link is there any ideas? because to post it to a txt file it would be posting 2 places is there a way to do this? Code:

View Replies !   View Related
Holding It All Together
I'm using various php/mysql apps and intend to use many more Directories, Forums, CMS, Blogs, Wikis etc etc. The more I bring together the more complex it becomes with the duplication (or integration) of user data.

I know some apps integrate with LDAP. I wonder if anyone has any recommendation for integrating PHP solutions together using LDAP or LDAP style directory tools? I'd like to put something in that can provide as backbone for all apps.

View Replies !   View Related
Session Not Holding
I have this program written in php3 called PWMS or Parsec Labs Workflow Management System.

im trying to setup on a win2000pro workstation. The 2000 machine has the following installed PHP 4 Mysql 3.23 Phpmyadmin.

I created a virtual directory called pwms under the web servers document root and placed all the files in there. basically, i can get the main login page to come up and i can login. I then see the ability to add new projects, etc. If i then click on anything,
it returns me to the login page, as if the session had expired. If i look in the MySQL table it writes a session id, but doesnt write a user id. Another person had set this up at their home running XP and it works fine. The program does write a user id to the
session table on their test machine. But here at work we cant get it to work for anything.

I know that the default user for mysql for the ability to insert into tables otherwise the session id wouldnt be written. I really need help here. Im thinking its possibly the system configured with PHP needs to have some value changed on the machine. I really dont know what would make it go back to the login page.

It keeps dumping us back to the login page. Its supposed to write a field called user_id in the database. It write he session ids but never the user. Its supposed to be a fully functional product so i think maybe there's something in the php.ini file that i should have edited?

View Replies !   View Related
Variable Holding
I'm using post to send the variable,the variable contains, $query1="stremname,stream_id,resoluiton";
as below:

<form name="createquery" method="post" action="runquery1.php">

...then passing values as below:

echo "<input readonly name="query1" value=$query1 size=$qsize >";
?>

and then using a submit button. Is it correct.

<input type="submit" value="Run" >
Edit/Delete Message

View Replies !   View Related
Holding A Loop
I am using a loop:

while ($row = mysql_fetch_array($result))
{
extract($row);

echo "<table >
<td>$createDate</td>

<td>$loginName</td>

</td>

</tr>
</table>";

}

What I want to do is loop this 10 times echoing the first 10, and then pause. Then on the click (or something) the next 10 come up on the screen.

My thinking is that I need to use the continue function to restrict the loop, but how do I just pause it, instruct it to restart but on a clean screen..

View Replies !   View Related
404 Vs. Hand-holding
I have known that many people have made atrocious spelling errors when creating links to my site and sub-pages. I kept getting complaints from surfers who followed these links from other sites (my 404 is a php script and has a link back to my home page and to also one to contact me). The site owners (of the bad links) cannot be contacted because cell phones generally do not send referrer info.

Then I decided to customize the error, based on common spelling errors, stupid entries, outdated urls, etc. and display how it might be corrected and a reminder to update bookmarks and/or contact the webmaster of the offending site. But who reads that stuff anyway!

What are the pros and cons of using my "customized errors" verses using apache's mod_rewrite to quietly direct the user? I feel the latter only encourages the bad links to persist and continue to be bookmarked by others, but then again, the surfer wasn't at fault when clicking a link.

View Replies !   View Related
Holding Checklist Value
here users should be able to choose the products from the product catelogue. Once they finish choosing products, they will be taken to a "Order Form" where they will see all the products they have chosen (they can add quantity or delete some of the products they need from this page) and they will be fill in their contacts before they place the order. Do we need to use session for this?

View Replies !   View Related
Holding Variables
I have a registration form, with quite a bit of validation, if something doesnt match, then the php script will throw up an error with a "click here to go back. When the user goes back using their browser or following the link, the variables of username, password etc etc dissapear causing the user to re-type everything.

View Replies !   View Related
Holding Temporary Links
Say someone wants to post a reply on my forum, the link would be reply.php?id=57, they need to login first, so it points them to the login. At the end of the login script it redirects them to index.php using window.location. How would I get it so after they login it takes them to reply.php?id=57.

View Replies !   View Related
Holding Place Values In Mysql
I have a field in my database that is a winning percentage for each team in my league. This field is a float and I want the winning percentage to produce 3 decimal places. The problem I am having is that when I enter the value in the DB if the value is say, .650, itr only enters .65. I want it is this way for consistentcy when I print the data on my stats page. Is there any way to combat this?

View Replies !   View Related
Code To Determine If A Variable Is Holding Anything?
What is the php code to determine if a variable is null or empty?

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved