Jump to content

jacklindsay1990

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jacklindsay1990's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok, so any recommendations on where i can find more on this or anything?
  2. just thought i'd let you know that i found the problem...it was nothing to do with my script, or your script...it was the mysql table where the data should have been submitted to. it was set to int instead of varchar +embarrised+. thanks for your help anyway
  3. HI there, thanks for your reply sudden. i've tried what you said but im still having problems i just get a sytax error, but as for as i can see, its all ok
  4. Hi there i have a script which work a while ago, and has no somehow broken. (dont know what i've done, but i have been edititng alot of it. its a form which in the dropdown boxes, pulls data from a mysql table, and when subitted, adds the record to a different table. this did work before but now, when i submit, i have a ' 0 ' where the data should be. i can pull the data from the first table fine...i just cant submit it i have a attached a zip with the main file and the file which has the form in it. even u need any other documents, i'll happily give them. i hope someone can find why its broken:( thanks for any help jack lindsay here's the code for the main page [attachment deleted by admin]
  5. Hello people ok...im not sure if what im asking is actually possible but i'll ask anyway. i have a form which adds records to a table below the form i have some script which shows all the information that is in the table <table width="806" border="1" cellspacing="0" cellpadding="0"> <tr> <!-- <td width="30">id#</td>--> <td width="150">Rep Name</td> <td width="45">Rep #</td> <td width="54" align="center">Model </td> <td width="48">Serial</td> <td width="30">Tag</td> <td width="89">Issue Date</td> <td width="52">Issuer</td> <td width="65">Division</td> <td width="89">Comments</td> <td width="53"> </td> <td width="75"> </td> </tr> <? while ( $myrowRes = mysql_fetch_array($resultName) ) { ?> <tr> <td><? echo $myrowRes['repName'];?></td> <td><? echo $myrowRes['repNumber'];?></td> <td align="center"><? echo $myrowRes['laptopModel'];?></td> <td><? echo $myrowRes['serial'];?></td> <td><? echo $myrowRes['tag'];?></td> <td><? echo $myrowRes['issueDate'];?></td> <td><? echo $myrowRes['issuer'];?></td> <td><? echo $myrowRes['division'];?></td> <td><? echo $myrowRes['comments'];?></td> <td align="center"><input name="edit1" type="button" value="Edit" onclick="javascript(go2Page(<? echo $myrowRes['statVal_id']; ?>));"/></td> <td align="center"><input name="delete" type="button" value="Delete" onclick="javascript(deleteItem(<? echo $myrowRes['statVal_id']; ?>));"/></td> </tr> <? } what i would like to add is in the form, 4 or 5 check boxes which, if selected, in the dispay of the mysql table has a lilttle tick image. any ideas if this is possible??
  6. ok i'll have a look, but how do i create this so that this page is only accessible if you login ?
  7. what exactly do you need to learn?
  8. hello there guys, im working on a lil project and im very stuck i have a script which works great. it allows me to add, edit and delete records in a mysql database. the thing is, this page needs only be accessible by us guys in the IT dept. i have a login "package" from a previous site which uses mysql for the users, and has what i think is refered to as a library? (the contents of all pages is in 1 document, and all the pages refer to functions on the library page to pull what information is displayed) anyway, i put the code for my record editing thing in a new function in the library, but when i go to the page, it doesn't work. it shows the form and the mysql table and records, but i cant edit, add or delete any records any idea's why this could be happening? or do you know of any other login packages that only refer you to the destination page once you've logged in? any help is greatly appreciated
  9. could you recommend me some places then, as i cant find any anywhere, and i've been googleing for the last 5 solid days
  10. yes...when that query is run, it successfully displays all the data in the table. what i want it to do, is instead of putting that data in the cell of a table, to simply put it in a text box, so that it can be edited, then i will somehow use an update query to put in the new data. on the comments field in particular, it will be a text area field but i need it all working first, then i can figure the little bits out
  11. hi, thanks for the reply. printing to a text field is the bit im having problems with. this is the code being used as my starting point. prints everything in the table on a page. <?php // Connects to your Database mysql_connect("localhost", "root", "toor") or die(mysql_error()); mysql_select_db("phplogin") or die(mysql_error()); $data = mysql_query("SELECT * FROM contracts") or die(mysql_error()); Print "<table border=0 cellpadding=5 cellspacing=8>"; while($info = mysql_fetch_array( $data )) { Print "<tr>"; Print "<th>rep_name:</th> <td>".$info['rep_name'] . "</td> "; Print "<th>division:</th> <td>".$info['division'] . " </td> "; Print "<th>title:</th> <td>".$info['title'] . "</td> "; Print "<th> displayed text </th> <td>".$info['title'] . "</td> "; Print "<th>rep_number:</th> <td>".$info['rep_number'] . "</td> "; Print "<th>description:</th> <td>".$info['description'] . "</td> "; Print "<th>serial:</th> <td>".$info['serial'] . "</td> "; Print "<th>tag:</th> <td>".$info['tag'] . "</td> "; Print "<th>comments:</th> <td>".$info['comments'] . "</td> </tr>"; } Print "</table>"; ?> i assumed that if i put: Print "<th>field test:</th><td><input type="text" name="textfield" id="textfield" value=">".$info['comments'] . "/</td> </tr>"; somewhere before the </table>";, that it would have put the same data in the text field for me, but this wasn't the case. it just said nothing, or i get an error any ideas?
  12. Hi Guys, i dont know if im in the right forum but i'll give it ago. im working on a site which has a mysql database which among other things, stores: name, rep number, issuedate, model, serial, tag, comments, issuer, and title. all these variables are inserted into the database using a form on a php page. this page i will to refer to as "registration page". this page works perfectly and i can add entry's with no problem what i would now like to do, is have an extremely similar page which has all of the same fields as the "registration page where i can type 1 of any details in any field. sooooo. say i want to do a search to see if a rep number is already registered, i type in the number and if it exists, the rest of the fields get populated with the data from that row in the table. becuause i want to be able to edit as well as search, i think this would be the best way to do it. i've tried searching this on google, but i cant seem to find what im after. it all seems to be either "print" which puts all the results on a page, or uses a drop down. and if its a drop down, there's will have to be 9 fields which have around 300 entries (not benificial at all), so an overview of what im after. some code which can either be in another page or the current "registration" page where i can search for records and edit records easily. thank you in advanced for any help jack
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.