my actual problem is the syntax for setting the form action....
echo "<form action = '". $what should this variable be (POST / SESSION ?) ."' >";
// code for the data pull and the inout fields...
<input type = 'submit' name = 'navbut' value = 'next'>
<input type = 'submit' name = 'navbut'...
I kind already have it doing part of this to run the updates.
Three buttons with three different names and values (doe this make a real difference?)
it currently reads soemtihng like
if($_POST['next']){
// runs update query
// but how can I set the form action to = $_SERVER['PHP_SELF'] ...
Once again thanks for the help on this.
Putting it all in one form solved one problem but then caused another. Now the page pulls and updates the first set of records fine, but the paging navigation buttons no longer work.
Ideally the button do 2 things, first they run the update to any...
Unfortunately it doesn't work by something else. It brings the data in but
I can't seem to grab the ids or the edited field values. It returns an array error when I give the inputs a name?
Below is the posted code....
<?php
session_start(); #2
if ( $_SESSION['login']!="yes" )
{...
The short answer to both questions is no.
I am working between three separate scripts and I am tryingt obrnig them together.
Script 1 is ideally going to be the final project. This script queries the databse and returns what can be a rather large data set of members, can number at times...
skiflyer-
thanks for your help on this.
i have the update working when i pull all the data in to one page, but when i break my data set up using limit x, y statements and have next & previous buttons, it falls apart.
any thoughts?
i'm working on verifing the values entered by the user now.
what i would like is to have something like
if (entered name != orginail name){
run update}
the only way i can think to maek that work is to include in the table hidden fields for each value that could be updated so that on POST both...
Thanks, that worked perfect. Now I've found that my work around for the submit button (submit != 'false') isn't good because when i open the form all the POST variables are empty so everything is updated to "".
That also had to be changed to the $_POST['Submit']
Thanks for your help on this.
when i tried swapping $name for $_POST['name'] it returns ARRAY and makes the other field empty.
any suggestions? how should the code look using the POST varialbes.
This code looks like what I need to happen, but before I modified it to use in my web app. I tried it as is. It did not work but I can't figure out why.
<strong>Update multiple rows in mysql</strong><br>
<?php
$host="localhost"; // Host name
$username="root"; // Mysql username...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.