Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › PHP MySQL Updating help
New Posts  All Forums:Forum Nav:

PHP MySQL Updating help

post #1 of 4
Thread Starter 
I have here an html page I made which is supposed to show the mysql data in the input fields for me to edit or view.
Code:
<?php
include("database.php");

mysql_select_db(my_db, $con);

$result = mysql_query(SELECT * FROM teams);

$row = mysql_fetch_array($result);
  
?>
<br>

<form action="insert.php" method=post>
<input name="number" type=text maxlength="1" value="<?php print $row['numb']; ?>"/><br>
<input name="name" type=text maxlength="15" value="<? print $row['name']; ?>"/><br>
<input name="skillset" type=text maxlength="1" value="<? print $row['skill']; ?>"/><br>
<input name="initgroup" type=text maxlength="1" value="<? print $row['grp']; ?>"/><br>
<input name="memberA" type=text value="<? print $row['memberA']; ?>"/><br>
<input name="memberB" type=text value="<? print $row['memberB']; ?>"/><br>
<input name="memberC" type=text value="<? print $row['memberC']; ?>"/><br>
Verified: <? print $row['veri']; ?><br>
<br><input type="submit" value="Update">
<?
}
mysql_close($con);
?>

For some reason, this is the result:

post #2 of 4
Unless your server has been reconfigured you need to use a .php extension. That would be the first step.
Main Rig
(15 items)
 
  
Reply
Main Rig
(15 items)
 
  
Reply
post #3 of 4
Thread Starter 
For some reason, the first server I uploaded the file to didn't echo errors. After I uploaded it to one of my servers, fixed the errors, then changed the ext to php, it worked. Thanks BFRD
post #4 of 4
google > dadabik

saves so much hassle
yeoooo
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 32A 1.8GHz Gigabyte GA-965P-S3 8800GT 512MB PCI-e 2x1GB Geil PC6400C4 (800MHz 4-4-4-12) 
Hard DriveOptical DriveOSMonitor
2x250GB Samsung Spinpoints, 1x120GB Maxtor Pioneer DVR-108 Win 7 Pro x64 19" Iiyama E1900S 
PowerCaseMouseMouse Pad
550W Seasonic S12 Antec 300 Razer Diamondback Icemat Glass 
  hide details  
Reply
yeoooo
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 32A 1.8GHz Gigabyte GA-965P-S3 8800GT 512MB PCI-e 2x1GB Geil PC6400C4 (800MHz 4-4-4-12) 
Hard DriveOptical DriveOSMonitor
2x250GB Samsung Spinpoints, 1x120GB Maxtor Pioneer DVR-108 Win 7 Pro x64 19" Iiyama E1900S 
PowerCaseMouseMouse Pad
550W Seasonic S12 Antec 300 Razer Diamondback Icemat Glass 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › PHP MySQL Updating help