<form action="./fullc.php" method="get"> <input type="text" name="code" value="AT"/> <button type="submit">Go To</button> </form>
(hug)
I might just keep the original code :P
Anyway, what makes this "better"?
$editnews =MYSQL_QUERY("UPDATE nmr SET code='$code',labbookref='$labbookref',contents='$contents',solvent='$solvent',elements='$elements',servercode='$servercode',time='$time',machine='$machine',year='$year',month='$month',nmre1='$nmre1',nmrn1='$nmrn1',nmre2='$nmre2',nmrn2='$nmrn2',nmre3='$nmre3',nmrn3='$nmrn3',nmre4='$nmre4',nmrn4='$nmrn4',nmre5='$nmre5',nmrn5='$nmrn5' WHERE id='$id' ");
Id is mediumint(5).
Just tried echoing it and it doesn't seem to echo $id which is odd.
Actually, I may know why.
Right, id issue sorted, when I echo it and run it directly in mysql (phpmyadmin) it works fine, no errors, and the database updates as expected.
:@
if ( ! isNumeric($id) ){ throwError('Invalid id supplied'); }
Since it's all to do with the same database/site I'll ask it in this thread.
Is it possible to have a link/button on a website that tells the server to execute a batch file of some sort?
For my site I use Irfanview to convert PDFs to PNGs which are dumped in a certain folder, and I do this manually. After looking around it seems that you can run Irfanview from the command line with whatever switches you want, I'll have to look into what exactly I need, but only if it's worth doing.
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $prefixweb = "./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/"; $prefixuni = "file:///N:/vol3/users/snmrdata/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/"; echo " STUFF "; }
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {$prefixweb = "./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/"; if ($row['machine']=="varian") { $prefixuni = "file:///N:/vol3/users/snmrdata/{$row['year']}/service/{$row['month']}/4_StuYEAR/{$row['servercode']}/" else $prefixuni = "file:///N:/vol3/users/snmrdata/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}"; } echo " STUFF "; }