Info Deleted Itself From Database?
I got some info (news system) in a SQL database but after some days it deletes by itself it happened to me once but i thought i didnt remembered that i deleted it but today it happened again...it deleted by itself! lol
I have other tables in the same database so its a table problem...
How can i fix this? Did i miss something at the table configuration?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Recall Database Info
Hi, I want to create a page where users can put in certain information like you normialy would in a form but when they click submit another page will load that will look like the original form the signed up with and everything they filed in that time will be there and they can make changes to that and then click submit and the changes are made to databse automaticialy.
How To Send Info To Database
im wondering how to submit info into a database. i know the code goes something lie $sql = "UPDATE <tablename> set $var = "var" but i know that is wrong and i want to put it in form so on submit it posts it in the database.
Get And Insert Info Into Database
I have one table (form) that has multiple fields. Here are few fields we need to know: ID, NAME, CITY, STATE, PROFESSION, x, y, z (x, y, z means more than 50 fields that give me more information about each name). The ID and NAME are unique and they don't change (each name has it's own ID). A NAME and its ID can be in any CITY, STATE or PROFESSION but this is fixed. That means if ID# 123 for Mr JOHN is Austin, TX, that will stay in Austin, TX for ever. I have more than 5000 NAME and it's ID, 9 professions, all US States and all Cities in my database. Here is what I need to do: I want to have a form on my site that my visitor finds his name first and then enters more information about him/her that will complete my database fields of x,y,z. What I'm thinking to do is to create a drop down list that the visitor first selects the profession. Based on the profession the second list shows the states that has that profession. Then by selecting the state, all the available cities will show up in the third list, and by selecting the city all the names related to that profession in that city, state will show up and he can select the name from the forth list. Then he enters other required information about him that will be send and saved in the database. Here is what I have done and I know to do so far: I have created the database with all the information in one table. I also know how to send data to database to be saved. But my problem at this point is how to create this list selection that narrows the search to find the right person.
Retrieving Info From A Database
I would like the code below to fetch and display in an html table the Ad_Id, Date, and Type_Job fields from the 1st 10 rows of a table called employment. I'd like the results to be sorted first by date and then by the Ad_Id #. I have replaced my username and password with "user" and "password". Currently, the script returns the error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource Also, the script is ignoring the css info that I have supplied. Code:
Populating A Form Wth Database Info
I've coded a piece of code which populates a form with data read from the database: $connection=mysql_connec ("localhost", "f2821842", "f2821842"); $result=mysql_select_db("QUERIES"); $query=mysql_query("Select * from Emp_Details where emp_num = '$employnum'"); while($row=mysql_fetch_array($query)) {$empname=$row['emp_name'];} <form name="webregform" action="webadmin2.php" method="post"> <input name="requiredname" type="text" size="30" value="<?php echo "$empname"; ?>"> </form> When I echo the $requiredname, I get spaces and no data, and I know that $empname is not a space-it does read a value in a database. 1. How can I get $requiredname to print a value?
Ordering Info Returned From Database
I have a PHP page on my site which pulls back info from my MySQL database and displays it in a table under appropriate headings. Is there code that I could add to these headings so that a) the same page could be redisplayed with the information sorted by the third column instead of the first b) information in the columns could be displayed in reverse order (maybe Z to A or highest figure to lowest figure)
Session Variable Info To Database
I have a 2 page form. The first page page of the form POSTS to the 2nd page which, after being filled out, should send all the information (from pages 1 and 2) to the database. I have created a session variable and have placed it at the top of the 2nd page. For brevity´s sake I have placed only one of the variables in this example: <?php session_start(); $_SESSION["sessanimals"] = $_POST["animals"]; ?> After filling out the remaining variables on page 2, I want all the information (the info from page 1 brought over in the session variable and the info from page 2) sent to the database. I tried creating an INSERT RECORD on page 2 but only the variables on page 2 are subsequently sent upon submission. How do I get all the info into my database?? Here are a list of my questions: 1. Is there any way of creating one session variable for all my page 1 form variables (I have 20+ variables)? 2. is there a way to denote ALL the variables in = $_POST[]; or do they have to be listed separately? 3. How do I post all the data from page 1 and 2 into my database at once?
Insert Form Info Into Database
i am trying to enter info from a form into a mysql database. when i submit the form, a new row is created, but the information isn't contained in it? any thoughts? PHP Code:
Filling Form With Database Info
I have a table with 5 fields for a tour business activity list : (1) id -table key (2) name (3)description (4)picture -text link not binary(5) country. I would like to create a form that takes all the activitys an puts it neatly down on site in checkboxes so user can select activtys.this will be linked to form mail.i would like the activitys to be seperated by the country they r in?
Update Database Info Using Forms
i have a page uses select and cases. i already have setup and working, auth/login to the page, create a new row in the table. i am now trying to have the user alter the information that the just put into the table. this is the code where i have setup to modify the info, $id is passed over. this puts the correct information into the form field. when i hit submit, the information, $name, $content, $id are not passed over. echo-ing results blank. PHP Code:
Hiding Database Connection Info
In a php script, I have to connect to a remote mysql database. I'm a bit worried that some user might be bale to retrieve the source of the page and see the user name and password to connect to the db. Is this resonable? What's the best way to avoid it?
Obtaining Info From Database Table
How do you obtain fields from a table and assign each field to a variable to be used as needed. An example: Say i had: table name : user Field 1 : User name Field 2: Password then i wanted: $username = field 1 $password = field 2.
User Info Not Posting To Database
I am trying to figure out why my script isn't updating the information of the user names stored in the database. Can anyone give me the solution? Below is the script: Code:
How To Obscure Database Info In PHP Pages
I'm moving from Cold Fusion to PHP and I have a question that none of the books I have answers adequately: In Cold Fusion, database connection parameters like the table, username and password are configured on the server. Since they are at the backend, nothing is exposed on the page except the queries themselves. In PHP, from what I see, the database info is on the page. Is this not a security risk? How can one be sure that this info is not on the page sent to the user?
Validating Form Info Before Inserting It Into Database
I have been trying to create a PHP application where you can add customer contacts to a MySQL database. Now, my problem began when I created a form where the user can add in a customer's name and info to the database. In an effort to alert the user that they may be adding a customer that is already setup in the database, knowing that some of the customers may have the same names, e.g. there is more than one Bobby Ray Brown, I decided to add a script that queries the "customers" table in the database and searches for all results that match the input from the user. Code:
Entering/checking Info Into Mysql Database
I have set up a client database where one can view, add, edit and delete entries. I ran into a problem setting up the add page. On this page i have set up forms to add info into the DB, and it works fine, but i dont want duplicate clients. Is there a way to set it up so that when you submit the form with the info it checks for duplicates and if there is one returns "sorry this record exists?"
Retrieve An Image In Folder From Info Out Of Database
i am having problems displaying an image once i have uploaded it. i upload it to a folder and store its name in a database. below is the code to display the image. I have figured out the the code is not grabbing the name from the database but i can not figure out why. can anyone help? //Retrieves data from MySQL $data = mysql_query("SELECT IMAGE_NAME FROM item") or die(mysql_error()); //Puts it into an array while($info = mysql_fetch_array( $data )) { //Outputs the image and other data Echo "<img src=http://www.abcxyz.com/pics/".$info['photo'] ."<br>"; }
Sends SMTP Mail From Database Info
I've got this script that I want to use to send SMTP mail from a form that allows the user to select recipients from a dropdown list that is created using database info and send a message. Two of the selections in the dropdown list are groups. My script works fine when the user selects only one recipient. I run into trouble when the user selects one of the two groups. The message ends up getting sent numerous times to the people in the group. I received the message 9 times. I think the script is looping more times than it should. Does this make sense so far? Here's the script that receives the form data and connects to the DB to get the recipient email addresses and then sends the message: Code:
Retrieving Database Info Based On User
I'm still quite new to php and mysql but I have been unable to figure this out. I'm attempting to display a specific row and column from a mysql database based on the user. $result = mysql_query("SELECT fbleague FROM users WHERE username = $_SESSION[username]"); fbleague is the column users is the table username is the primary key column $_SESSION[username] is the username variable Then later I try to display it with echo "You are in league $result "; I know $_SESSION[username] is set correctly because I can display that with no problems.
Uploading Info From A Text File Into A MySQL Database
what would the PHP and SQL code be to say basically: make a new row and put this in the field, what comes after each comma goes in a new field, and each new line should be a new row. I have a huge text file that i don't have a way to upload directly into a MySQL database because my webhost isn't allowing it for some reason.
Upload & Query MySQL Info Database With Image Files
I want a database I can enter information and upload a photo from a web form. Then I want to query that database for the text info with its related photo and display it (formatted) in a browser (html). Summary: 1. upload photo's and text information to database with my add article form. 2. Query the database and page the results with the text and related photo. It comes in three parts: 1. add_article.php [Text / Photo Upload Form] 2. insert_article.php [Inserts into database] 3. articles.php [View Output] Here is what I have this far:
Putting Info Into A DB / Passing Info Between Pages
I have run into an issue...I have posted previously, but my scenario has changed. Here is the situation... If a user clicks on a link ('abc123' for example) I want to insert into my database some predefined information about 'abc123' - I have assigned a value that is echoed in future pages for 'abc123'. So, what I need is some mechanism to, when a user clicks 'abc123', have a pre-defined username and password be entered into the database. I need this so future pages can utilize the session values.
Directory Deleted
So far i m using following code for deleting folders and files.But it will only delete those folders which r empty.I want to delete those folders also which has some files.pls give me the solution <?php error_reporting(0); include("../connection.php"); $date = date("m/d/Y"); //For finding current current function dateDiff($dformat, $endDate, $beginDate) { $date_parts1=explode($dformat, $beginDate); $date_parts2=explode($dformat, $endDate); $start_date=gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]); $end_date=gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]); return $end_date - $start_date; } ?> ....................
Get ID Of Deleted Items
I wonder if there is anything similar to "mysql_insert_id();" for deleted/updated id's? If i do a query and DELETE WHERE text_field="", can i get the id's of the fields that were deleted?
Session Files Will Not Be Deleted
My problem: - i dont wan´t to destroy the session - i want that the session will be deleted by "php" when the gc maxlifetime parameter hits - i can turn this parameter on what i want - nothing will be deleted! - in my specail case - i make use of session_save_path - i use my own Could it be, that "php" doesnt delete session files in own session_save_paths ?
Deleted Php.ini And Cant Produce An Error
I deleted every instance of php.ini on my computer and restarted IIS. I was hoping i could envoke an error so I can figure out which php.ini it was using. But my application runs normally.
Help! Need To Recover Deleted Tables!
Im not sure if Im in the right place here but .. I am using a unusual combo of PHP MSSQL ODBC and MSAcess on a windows server 2003 box. All my tables in a database were deleted using the SQL "DROP TABLE" command. Can these be recovered? And if so, how?
Deleted Record Still Being Counted.
Can anyone see any reason why this query would not return the number of rows containing the correct "EID" "CID" where email address is "cs.com" or "webtv.com"..... for some reason it always returns 1 even if the database is empty. The only other flaw that I see is that I had a record that matched this criteria, then I deleted it from the database, but it still seems to want to count it for some reason. PHP Code:
$_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:
Filling In For Deleted Images
I am creating an image gallary where the images are numbered 1, 2, 3 etc. Users will be uploading the images so if i need to delete an image, I need the code to be able to check if that number has been deleted and replace it with the next uploaded image. I have the code pulling from a txt file with a counter to name each file. The problem is that if images "36", "29" and "2" are removed... I need those slots to replaced in numerical order with the next uploaded images. So the next image will be named image "2" and will show up as the 2nd image on the page. Code:
File Automatically Being Deleted
Whenever index.php or .htaccess are created in a directory, they are automatically deleted. I'm guessing it is some kind of backdoor attack. Setting permissions to read only didn't help. Does anyone know how to see what is deleting the file? or protect it?
I've Deleted Admin Username And Password,
I've deleted my admin username and password which was initially set at test. Now I can't log into my website as the administrator. How do I put Username and Password back so that I can set my own password and username again, log in to my website and edit it. Which file do I have to edit, and where do I re-set the Username and Password?
Updating Id Numbers To Be Consecutive After Deleted Some
I have a list of ip addresses that have accessed my web site and i have check boxes next to them so i can delete whichever ones i want. after i delete them, i want the name_id field to re-autoincrament after the other rows have been deleted. does anyone know how to do this? i know this line can set the autoinc to a new number, but how do i re autoinc the whole table?
Character Deleted And Mail Function
I use the mail function in order to send mail on a LAN Lotus Notes server (SMTP). I send big html mail with the "MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1" format. But, in the message, some characters are deleted, one for 10 lines. After a test, (message with 1234567890), a character is deleted approximately every 1000 character. Have you some ideas ? The problem is coming from php or Lotus Notes ?
Script To Access Expired/deleted Domains?
Does anyone know if there is a script available to access expired/deleted domains? If not, does anyone know how do you get access to the daily expired/deleted domains database?
Reset Row "id's" After Arbitrary Value Deleted
Is there a way to reset the auto_increment value and all subsequent values for that table if you delete an arbitrary row? example: row 0 - test info row 1 - test info row 2 - test info row 3 - test info new auto_increment value = 4 I delete row 2, so table looks like: row 0 - test info row 1 - test info row 3 - test info the auto_increment is still 4, but there are only 3 rows in the table and the values are not correct. Is there a function or easy way to "reorganize" the row values and reset the auto_increment?
A "few" Old Session Files Never Deleted?
I have session files stored in a special tmp directory specific to a virtual host instance. The Max_lifetime is long 86400 (1 day) which I don't suppose is the problem. Anyway the sessions do indeed expire and "most" of the old session files disappear as expected. Not all however. I am finding several old session files with Unix last mod times weeks in the past. This behavior observed on PHP 4.2 and 4.3.
I Need Info...
I want to write a very simple PHP script that just picks random images from a directory, you know what i mean. So I'd like to know where I could find information about this in the PHP manual maybe?
PHP - SSL Info
How do i know if ssl has been enabled in a WAMP configuration using PHP ?
Looking In $var For Certain Info
I pulled certain collums from my database. The value of the collums is either Y or N. I want to figure out on each $var how many Y's there are. I don't care how many N's. At the end I'm going to add up all the Y's of all the VARs for stats. Whats the best way of counting Y's in a $var?
Getting Users Info
I need to get the following information, User's IP User's Browser User's Screensize What is the code for any of these as I can't find it in the PHP manual.
How To Get Header Info
I've been trying to extract the status codes from http header information to find whether a page is 200 ok or 404 not found by using an fsock() connection which works. To actually extract the data what do you use? i've seen fputs() and fgets() listed on the documentation page but how do these function actually work?
Info From MySql DB
Problem : I have a table in mysql with titles as such : ShipIDNameMcostCcostBuildETA(there are more) I run the query : for($i=1;$i<=9;$i++){ $query = "select Name, Mcost, Ccost, BuildETA from ships where ShipID=$i"; $result = mysql_query($query) or die("Query failed"); I want to refer to "Name", "Mcost", "Ccost" and "BuildETA" so i can use them to build a table. So i need to assign them to variables in an array so i can loop to make a table with as many rows as there are "ShipID"'s. The thing is that all the ways i have tried of refering to individual column names have failed.
PEAR/Info.php
I tried to use Example 49-1. Using PEAR_Info This is not showing PEAR installation information on local/remote server. What I see local, I've no file Info.php in package PEAR in PEAR directory. I've installed PEAR, why this file is missing? My Web host say, they've installed PEAR, and I can use PEAR.
Getting Info Into A Object..
I'm sitting and trying to understand this OOP - and need to create a class wich can do the following.. ShowBlocks() - Displays the data wich is inside it - If empty creates a form wich sends the info back to the Object, wich show the stuff.. AddBlock( $type ) - Creates an empty blok - wich is addet to a blocks area object...( Or somethin like it ) Store() - safes the info into a file, and updates mySQL... I have figured out most of the stuff but the way to get the empty block -> creating form with some different strings/textbloks and a file -> putting stuff into object -> now showing what its looks like and aking if i want to add a extra block....... now showing x blocks then asking if i want an extra block - i haven´t got a clue of how to do it ! Does anyone of you have an example with an object thats goes : See im a empty object -> here you can put an line into me -> see im not empty now ( showing the string) do you want to add an extra line ? - ect ect..
Help Need Php Security Info
I need to put on a demo of a php security flaw and how to fix it. Can anyone point me in the direction of a good doc and fix example ...
|