fanta1066 Posted October 18, 2005 Share Posted October 18, 2005 Can some one please advise me with some sample code. Basically I have a table in MYSQL and within this table I have a field called record_number. Obviously its an Integer and it auto increments. within an HTML form with php code all I want is to display the value of this field + 1 So in other words if the value of record_number is 15 in the table and when the HTML form is launched the PHP code will interrogate the table get the value and some where on my form it will state the following. Record Number = 16 Please can some one give me some real code that I could use. thanks Please email code to h.ghelani@rbht.nhs.uk Quote Link to comment https://forums.phpfreaks.com/topic/2692-get-value-of-field-in-table/ Share on other sites More sharing options...
khuti Posted October 20, 2005 Share Posted October 20, 2005 hi, i think ur starting out in sumthing too deep personally, if u no anything about programming u would no how easy it is to do that.. i would suggest starting off with sumink like vbscript.. its not used much these days but its easy to get to grips with. once u understand the conecept of programmin.. things like this n javascript will b much easier. anywho what u wana do is call the field from the database isnt a variable so like.. $record_no = $row['tables_field_name'] + 1; then u display it like.. echo("recored number: " . $record_no . " - "); if u dont no how to do the rest of the code like a database connection n query or if none of this makes any sense. id would seriously giv up on this stuff for now. go learn sumink easier like i said above. n come bk to this later when ur feeling more comfortable with programmin. hope this helps, khuti Quote Link to comment https://forums.phpfreaks.com/topic/2692-get-value-of-field-in-table/#findComment-8984 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.