Updating DB Locally
I have a database on my local machine that I make entries and
corrections on. I'd like to be able to upload that to my server and have
that update the database that's on the server. What I've been doing is
saving the local file as a backup. Then I have to edit the backup,
deleting the create file info and all previously uploaded entries before
I can import the text file to the server.
Is there an easier way to do this so I won't get duplicate entry
notices. I'd like the info from my local file to overwrite the server
file like FTPing a new web page will overwrite the old one. Is this
possible to do with mySQL?
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Using Php Locally
i have a site and my customer wishes me to transfer the whole site (it uses PHP and MYsql) to a laptop. So can u guys (and gals) recommend a nice little programme which will allow me to run php and Mysql on the lappy? I had PHP Dev or something like that and i lost it - and i cant find it.
View Replies !
View Related
Php.ini Sessions Locally
I've got a test server set up on my Mac with PHP5 and mySQL, and I've got two problems that I believe can be solved through the PHP settings on my local machine. First, the new buld of PHP seems to default the 'display_errors' setting in PHP to 'Off', and I'd like to turn it on. I've found several online posts about how to edit your php.ini file, and I've gone in the edited my php.ini file and changed the 'display_errors' to 'On', and uncommented the line, yet it still does not work. If anyone knows how to fix that, or have any ideas of what I might have done wrong, that'd be great. And then I'm working with a login/admin setup that I'd like to test locally, but sessions does not seem to work on my machine. It works when I upload it via FTP to my hosting server, but not locally. I'm thinking that there might be a setting for this in my php.ini file as well. Anyone have any ideas?
View Replies !
View Related
Using $_GET[] Locally
I have code which works fine over the Internet using formmail to send the results by email but I am trying to run the code on my PC using IIS and I cannot get the correct xxx values for $_GET[xxx], to use echo &_GET[xxx] etc. The parameters being sent include &Slider+Values=+%0D%0ASituation+-+Social+Individual%3A+3+3+3+3+3+3+3+0 &Slider+Values=+%0D%0ASituation+-+Formal+Individual%3A+3+3+3+3+3+3+3+1 &Slider+Values=+%0D%0ASituation+-+Social+Group%3A+3+3+3+3+3+3+3+2 What do I use for the xxx values in $_GET[xxx]?
View Replies !
View Related
Redirecting A Url To My Server Locally
I have a domain that I want to point to my local server, so if I type in www.ebay.com, it doesn't go there, but to my apache server. I tried doing this in windows hosts file, added the line: 127.0.0.1 www.ebay.com But it just didn't work. I'm not sure what else to try, and was pretty sure that way worked - didn't do anything period. Does anyone know anything else to try?
View Replies !
View Related
Launching Files Locally
I have PHP and Apache installed on a windows box that is attached to my home theater. I wrote some code that indexes the contents of a directory that has some video clips etc in it, and the outputted HMTL is nothing more than a series of hyperlinks to these files, with some CSS to liven it up a bit. The problem is this: when I click on one of the links, rather than launch the file, it attempts to "download" it (even though the file resides right there on the machine anyway). In my hyperlinks, I specified to use the "file:" protocol instead of HTTP. I really just want it to launch the file.
View Replies !
View Related
Sending Emails (locally).
is anyone familiar with WAMP5 or the like? for building and testing php/mysql applications locally. This is basically how I build my site, and it would save a lot of trouble if I could build and properly test emails locally and not need to upload to my web host just for it to work. I use the mail() function.
View Replies !
View Related
Setting Up A Test Server Locally?
in the right direction to setting up a local server or whatever it's called on my computer so that I can test sites locally, before uploading them onto the internet? I've no idea where to start... just heard bits about it. It'd just be helpfull to test my code, before putting it out for people to see.
View Replies !
View Related
Errors Shown Locally (in The HTML)
I have a script with some evals. When an error occurs in the eval PHP+HTML code, the error is shown after that a lot of HTML has already been output (Provided that the error is not very serious - a warning for example - and that there is some HTML code before the PHP code from which the error comes). This is annoying. I would like the error msgs to be displayed like the parse errors msgs get displayed (that is alone and top, right of the page). Is this possible with errors being displayed locally in the HTML?
View Replies !
View Related
Undefined Variable Passing Vars Locally Via URL
I've recently installed Apache 2 and php 5.2 on my WIndows XP machine. Everything is up and running. I'm passing some vars via the URL. It works fine online: http://www.torusdesign.nl/spry/test...SchilderijenNAV This is the code: <?php echo $folder; ?> <?php echo $navColor; ?> The problem is that when I test it locally I get an error that the variable in undefined. Notice: Undefined variable: folder in F:WEBSERVERApache2htdocssonja est.php on line 14 Notice: Undefined variable: folder in F:WEBSERVERApache2htdocssonja est.php on line 15 Notice: Undefined variable: navColor in F:WEBSERVERApache2htdocs sonja est.php on line 32 Can someone please help me out. Is there something wrong with my local php configuration?
View Replies !
View Related
PROBLEM: My PHP Scripts Try To Download Instead Of Run Locally (Win2K IIS)
I've had PHP on my Win2K server running IIs 5 for about 2 weeks now. I have an annoying problem in that I can not run the php scripts/pages locally, instead they open up in the browser as a download. By that I mean that If I access them via my lan or the net from another computer on my lan, the webpages that have php on them and end in a .php extension all run fine and work just great. BUT if I open up the browser on the IIs server and do a file open and browse to the php page I want, I get the download file box as the computer trys to download the page instead of executing it. An alternative method of getting the same error is if I use the browser on the server to locally open a web page up with a link to a php script/pagepage, I see the web page just as it should appear, but as soon as I click on the link to the PHP script/page the same download & save thing happens instead of the page just being processes normally. This is a real pain when I want to just run some scripts locally for testing or admin purposes.
View Replies !
View Related
Flash/PHP Search Engine Not Firing Locally
I have this flash/php search engine that works online (but only when i access it with Internet Explorer) For some reason when i try and run the swf itself from the location of my local apache server it does not process the php code to do the search. Here is an example of the Flash which takes the input of "name2" and sends it to the PHP. (by the way the links are just examples) Code:
View Replies !
View Related
Downloading A Remote File, And Saving It Locally
Im trying to retrieve a remote text file, and save it locally, downloading a new version every 2/3mins. Im no expert with PHP so am trying to base it off a script I have where it downloads the file and saves it locally every 15mins (overwriting the previous one). Ive tried mess around with the code, and I can get it to save the file locally with the correct filename, but I cant get it to download a new file everytime. This is the portion of code I have trying to achieve the above..anyone know how to solve the problem? Code:
View Replies !
View Related
Locally Works/remotely Breaks? (Oracle Related?)
I'm diving into this crazy PHP thing, and I find myself a bit stuck. Locally I can get a site to work very well. However, whenever I ask a buddy of mine to test the site and I give him my IP it doesn't work. I have a form. The form checks username/password against a database and then either sends you back to the form or forwards you to the next page. Is: header("Location: http://localhost/nextpage.php"); the proper form of redirection? The issue on the not at my computer logins is in this redirect. I'm not sure what I need to send, but I was getting connection errors in the beginning which aren't showing up anymore. Then I was getting unreferenced index errors, but I put all the variables in a session and that seems to work now. And now I'm stumped because I'm not getting errors in the log.
View Replies !
View Related
Page Coming Up Blank/white Online, But Works Fine Locally...
I'm going to start off making this question very vague and general (as to not over-clutter it with needless info), but if you want more details I can provide them... Basically, I have a PHP page (that serves to update a table on a SQL database) that works fine locally. But when posted online, the page doesn't even show up. There's no error or anything - the page is just blank (white). It displays this way both on IE and Firefox... It is one of many pages in the site. The site itself has the user log in, and then they can post a new record to the database, delete a record, or update/edit a current record. All other pages are working/displaying fine, but it's just that "update/edit" page that comes up blank (and again - it works fine locally, just not online).
View Replies !
View Related
Use Virtual Hosts To Develop Locally But Upload Throws Error In Source File References
On my development computer, I have virtual named host set up, like www.site1.lab. When I upload those to my web site for customer review under mywebsite.com/clients/site1/ it throws some of the source file references off and it does not work properly. My references are like: require_once($_SERVER['DOCUMENT_ROOT']."/utility/top.php"); Obviously those will not work since $_SERVER['DOCUMENT_ROOT'] references mywebsite.com. Is there anything I can do in apache.conf for a virtual directory that would make it so when I upload a site for customer review, I don't have to change the source references?
View Replies !
View Related
Turn On $_SERVER["PHP_AUTH_USER"] Locally?
I am finding that on a new server where I am developing $_SERVER["PHP_AUTH_USER"] and $_SERVER["PHP_AUTH_PW"] Do not show up in $_SERVER when I when they should be defined I test using print_r($_SERVER) or this <?php if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); echo 'Text to send if user hits Cancel button' exit; } else { echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>"; echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>"; } ?> Is there a setting that is keeping PHP from accessing this information? Can I set this locally? $_SERVER["REMOTE_USER"] also stays empty.
View Replies !
View Related
Updating The SQL Key Value
In an application I am writing the user can define a series of steps to be followed. I save them in a sql database using the field "order" (a smallint) as the primary key. (there are in the range of 20 steps) On the admin page the steps are listed, in "order" order and the user can create new steps and assign an order and all is well. The problem may come in using a renumber function which should take the steps in their current order and reassign the "order" key, assigning each set an "order" that is the prior "order" + 10. In other databases I have worked with this is a major pain because as soon as you save a record the order may change. OTOH, in mysql it appears that if you do a select for the whole table you have them all in memory and can change the value of the field "order" without having to worry about getting that record again and then save the whole table.
View Replies !
View Related
Row Not Updating?
Currently, when I select "Decline", it shows as if its okay, and there is no error. But when I look at my database row, it does not update the column 'deleteupload' to 'yes'. Code:
View Replies !
View Related
SQL Not Updating
Im sure im making a simple mistake can someone tell me why this code will not update my SQL, it shos the message that it completed but it never changes SQL Statement below: if($Submit == "Save"){ $titleedit = $_POST['titleedit']; $lengthedit = $_POST['lengthedit']; $priceedit = $_POST['priceedit']; $descedit = $_POST['descedit']; $theedit = $_POST['theedit']; $sql = "UPDATE excursions SET exc_title='$titleedit', exc_length='$lengthedit', exc_price='$priceedit', exc_desc='$descedit' WHERE exc_id='48'"; mysql_query("$sql") or die(mysql_error()); echo "Excursion Updated<br><br>"; }
View Replies !
View Related
Updating A Particular Row
Is it possible for me to increase the number value in a column of a particular row in my mysql database by a specific value? mysql_query("UPDATE users SET userspace += '50' WHERE username = 'username'"); Is that possible? To simply increase like that? If not, how can I?
View Replies !
View Related
Updating
now have the script. the only bit that is not updating is the wages part from the credits. <? include('config.php'); $wagebill = ($stat[employees]*$stat[wages]); error_reporting(E_ALL) ; ini_set('display_errors', 1); mysql_query('UPDATE players SET drugs = drugs + (drugfact*300), dpayout = (drugfact*300), steaks = steaks + (steakhouse*300), spayout = (steakhouse*300);'); mysql_query('UPDATE players SET credits=credits-($wagebill)'); ?>
View Replies !
View Related
Updating Php.ini
Alright, so when I run a php script that has an error, I get a blank white screen. I'd like to have it tell me my errors, at least in the dev phase. I tried updating my php.ini file but the changes did take but I still get a blank white page. I am on a Mac so I have Terminal built in, and can login to my server as root. I did vi /etc/php.ini and pulled the file up, found error_reporting = E_ALL which I assume is correct to display errors, and also display_errors = On but I still cannot see my errors. Is it that they are fatal errors and totally crash my script? The script in question is a huge if statement with tons of select and update statements, but I have pored over the code for two days and cannot find an error. Is there another way to fix my php.ini file, a function I can run at the top of my script to display errors or a 3rd party app that will parse errors out of my script?
View Replies !
View Related
Updating Php
i can use a command such as -> PHP Code: window.document.demo.test.value = "updated1"; to update a text field in a form like -> PHP Code: <input name="test" type="text"> However i want to start using array fields like -> PHP Code: <input name="test[]" type="text">
View Replies !
View Related
Updating Page
I've done a large PHP script which can take a long time to run. This script has to have an echo every so often so that it doesn't time out. I've been looking for quite a while for a way of updating a PHP page so that the text will actually be shown on the screen as it outputs rather than when all the script has finished. Working on another project using ASP (JavaScript) I found the following out: <% Response.Buffer=True %> <% Response.Flush %> which actually updates the page. Is there anyway of implementing this in PHP or something like it.
View Replies !
View Related
Updating Records
I am know to PHP i've been tring to do this **** for days now could someone PLEASE help me. Ok Im tring make an admin page where user can update multiple records at same time using checkboxes.Im using email as primary key. Here is the code **form page** <form action="update.php" method="post"> <input type="submit" name="submit" value="Select First 10 Names"> </form> **update.php** <?php if ($submit =="Select First 10 Names") { ?> <form method="post" action="<?php echo $PHP_SELF; ?>"> <hr size=3> <?php $query = mysql_query("select * from Names order by Last_Name limit 10"); while($row = mysql_fetch_array($query)) { $first_name= $row["First_Name"]; $middle_name = $row["Middle_Name"]; $last_name = $row["Last_Name"]; $email = $row["Email"]; $photo=$row["Photo"]; ?> <table width="100%" border="0" > <tr> <td align=right width=50%> <?php echo "First Name: <input type=text name="first_name" size="30" maxlength="40"value="$first_name" ><br> "; echo "Middle Name: <input type=text name="middle_name" size="30" maxlength="40" value="$middle_name"><br> "; echo "Last Name: <input type=text name="last_name" size="30" maxlength="40" value="$last_name"><br><br> "; echo "Email: <input type=text name="email" size="30" maxlength="40" value="$email" readonly><br><br> "; echo "Photo: <input type=text name="photo" size="30" maxlength="70" value="$photo"><br><br> "; echo "<input type="checkbox" name="email[]" value="$email"><b>Update?</b> "; ?> </td> <td align=right width=50%> <?php echo "$photo"; ?> </td> </tr> </table> <hr size=3><br> <?php } ?> <input type=submit name=submit value="Update Enteries"> <input type=reset> </form> <?php } if ($submit=="Update Enteries") { if (is_array($email)) { while (list($key,$value) = each($email)) { $query= mysql_query ("update Names set First_Name = '$first_name' Middle_Name= '$middle_name' Last_Name='$last_name' where Email='$value'"); } } } ?>
View Replies !
View Related
Updating Pages
I have embedded a PHP script into an IFRAME that queries a MySQL database to post comments. Comments can be added, and in theory, posted immediately. They do if you hit F5, but as soon as I shutdown the browser, go back to the comments page, the new comments are not there, until I hit F5. I've deleted all the temp files from my computer, so it shouldn't be that. I've tried contacting my hosting company, but they have nothing useful to say.
View Replies !
View Related
Problem Updating PHP 4.3.0 DEV To PHP 4.3.3
I had Apache 2.0.47 and PHP 4.3.0 DEV running successfully on a W2k Server. For some reason, I couldn't get PHP to read XML-Attributes with the DOM XML -functions. So I thought, it would be time to update PHP to a newer version. So I simply replaces the old php-files with the new ones and of course kept the php.ini. But now, PHP doesn't work anymore. As soon as I request a page with php code, I get a "document contains no data" error after a while. (Apache's error log looks like the excerpt at the end of this message) If I install PHP5, I can't even start Apache. Does anyone have an idea, what may go wrong here?
View Replies !
View Related
Updating The Column
I am updating the column ourpage in any row of the database busdir2 where cat = farming. It reads only rows where cat = farming correctly, but isn't getting the new ourpage value into the table. Code:
View Replies !
View Related
Apache Not Updating The New PHP
I've installed redhat 6.1 with apache 1.3.9 webserver and PHP3 by default, my problem is, my PHP is not supporting database(i.e MySQL, now i downloaded latest version of php(version 4), and installed it successfully with mysql option, but still my problem is the apache not updating the new PHP, the apxs is not on my apache directory... do i need to install another version of Apache? or just update my version of apache?
View Replies !
View Related
Updating Without Refreshing?
A Friend of mine was making a basic page that displayed news, topics etc.. and the number of users online, and he wanted the number of users online to be "live" as in it could be updated without having to refresh the page, I was wondering if anyone had any idea's on how to do this in PHP preferably or some other server side language, and if its even possible. I've search around to no avail, I told him he could probably do it if he used flash, but he doesnt want to use flash unless he has too.
View Replies !
View Related
Updating MySQL With PHP
The page I want to update is similar to "http:www.hospiceslo.org/events.php" (read only). On my update page I've got the same table as a FORM where the client can make changes to the fields. The problem I'm having is updating the MySQL data base with the content of the form. I have no clue and would like to know where to start. Can I get some pointers to references or examples,
View Replies !
View Related
Multiple Updating In PHP
I have attach the picture of the web page i'm creating now. I want to make it like when user tick all the checkbox and click submit, the page must update the database where the verify checkbox is ticked for the particular record and verified name for each record. Now when i tick certain checkbox, The page only tick the last row checkbox and name of the verifier for the last row of the record only. Code:
View Replies !
View Related
Updating Data
The following script I updated from a script I had that worked fine. What happens is that I'm able to query and display the data just fine, but when I alter any of the information in the form and submit it, the data I updated disappears from the table. Code:
View Replies !
View Related
Updating A Post.
i'm making a forum and am having a little trouble with updating a post. I have an edit button, it gets the post and puts it into a text box, but once finished editing, it will not update the post! I made it echo the message before updating and its the right thing and it doesn't give any errors. $postid=$_POST['postid']; $post=$_POST['post']; mysql_query("UPDATE posts SET post = '$post' WHERE postid = '$postid'") or die("Could not edit post."); Is there anything wrong with the above is it something else in the code?
View Replies !
View Related
Updating Counter
I need to update a counter when a file is downloaded. The purpose is to know when all the files have been downloaded and then delete the directory. The program lists the files to be downloaded and each download link goes to the start of the program to retrieve the file. My problem is that my counter is not updating. Code:
View Replies !
View Related
Updating Variables
I have a form on a page I am populating with data from db <tr><td><input name='name' type='text' size=྇' value=' $name' /></td></tr> this whole statement is being echoed, this part is working fine as the correct data shows up as it should. the problem is that this is part of an update page, I am having problems when you change your name, I have this form going to an update page where I update the db. The data is getting there alright but it is the original data, no changes made are sent to the update page. I am using $_GET to move the data <tr><td><input name='name2' type='hidden' value='$name' /></td></tr> this again is being echoed. am I wrong in thinking that if the text field is changed that the variable $name is also changed? or am I missing something here?
View Replies !
View Related
Updating All Rows
I put a new column in a table, and I want to update every row with the same info. I think this is the way to do it: UPDATE table SET newcolumn = 'xyz' Is this correct? I thought so, but when I execute the command, nothing happens. The column is a VARCHAR, in case that makes a difference.
View Replies !
View Related
Updating Quantities
I want to update the quantity (which is a text field) of a specific item (having an item#) BUT if there multiple rows chosen in the item list, (i.e you can have 4 rows and you update the quantities on each. How can you update the Database with a single submit button? So that the corresponding item# gets updated with the correct quantity. All values of the list are chosen from an mySql query.
View Replies !
View Related
All Fields Updating Except One!
I have a PHP script that gets data from a MySQL database and populates a form for editing. when the form is submitted all the fields are correctly updated except one that no matter what stays to the value given when the entry was created. Code:
View Replies !
View Related
Updating A Database
This script searches a folder and if it finds a .gif file it stores the url of that file in the database. This part works. Now if it finds no .gif in the folder, but a stored url in the database I want it to delete that information form the database. This part doesn't work. Can someone please help me out? The problem starts after the ELSE statement. Code:
View Replies !
View Related
|