Jump to content

lwharding

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lwharding's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have been using a mysql driven php scripts without error for a number of months up until a few days ago. The script itself takes details from a form as well as converting up to two images to .jpg's and then in turn inserts a new record into the database (INSERT INTO...) with a link to the two images (update 'db' set...) . when submitting the form now the new record is not created and the images are not uploaded. i have copied the data to a new table and run various checks on the table itself but to no avail. the only success i do get it is when i copy the table structure to a new table it then works fine. i have checked the existing table to see that there is no corruption nor links to external scripts. the db type is innodb/ I am truly at a loss and would greatly appreciate some expertise. Many thanks! Luha
  2. I have attempted as you have kindly suggested but cannot figure out what i am doing wrong, code is below. [code]if($word_ok!==false) { if($word_ok=="yes") // connect to db here require_once('../../../Connections/mysql.php');     //setup query:     $sql = "INSERT INTO test Name=$_POST['Name'], Title=$_POST['Title']";     $result = mysql_query($result);     // check that the query was successful:     if($result) {         echo "Update was successful";     } else {         echo "Query failed" . mysql_errror());     } else { echo "sorry, that's not the right word, try again.<br />"; } } [/code]
  3. I am aware of what the if statement would look like, the problem is when using an INSERT command within the success the page does not even display. for example ====================== if($captha == something) { SUCCESS then INSERT the record into 'My Table'  // place insert code here if captha is correct } else { FAILURE "Please re-enter captcha"    //place error message here if captha is incorrect }
  4. Help! I am in desperate need of some advice on how to create a catpcha for an insert form that I am currently using.  I have managed to create both a CAPTCHA and an INSERT form separately both of which work fine. Problem I have is that I cannot work out how to join the two together. The CAPTCHA displays either the success or failure notice using an IF statement, the problem i have is that I am not sure how I can change the success IF statement to and INSERT command. Hope this makes sense. Luke
  5. Can you please provide the full source code... [!--quoteo(post=341406:date=Jan 31 2006, 07:55 AM:name=Alanmoss)--][div class=\'quotetop\']QUOTE(Alanmoss @ Jan 31 2006, 07:55 AM) [snapback]341406[/snapback][/div][div class=\'quotemain\'][!--quotec--] Yes I copied the Javascript into the header. [/quote]
  6. This has been resolved. Problem was I was using 'from' within search syntax. Doh! [!--quoteo(post=345339:date=Feb 13 2006, 11:48 AM:name=Luke Harding)--][div class=\'quotetop\']QUOTE(Luke Harding @ Feb 13 2006, 11:48 AM) [snapback]345339[/snapback][/div][div class=\'quotemain\'][!--quotec--] I am having a difficulty with a certain search query I am trying to execute within Dreamweaver. I am attempting to create an number range search of a MySQL db; I have created a forms within a plain old html page that passes two fields ('from' and 'to') to the search page using 'GET' within a form. Then I have created a php page with a records set and the following SQL statement: =============================================== [b]SELECT hp.Name, hp.Age FROM hp WHERE hp.Age BETWEEN 'from' AND 'to' ORDER BY hp.Age ASC[/b] =============================================== I have entered in variables for the 'from' and 'to' fields to ensure that the above syntax is correct, which it is. However when executing the page it returns no results! Any ideas on this are greatly appreciated as I am well and truely stumped! [/quote]
  7. I am having a difficulty with a certain search query I am trying to execute within Dreamweaver. I am attempting to create an number range search of a MySQL db; I have created a forms within a plain old html page that passes two fields ('from' and 'to') to the search page using 'GET' within a form. Then I have created a php page with a records set and the following SQL statement: =============================================== [b]SELECT hp.Name, hp.Age FROM hp WHERE hp.Age BETWEEN 'from' AND 'to' ORDER BY hp.Age ASC[/b] =============================================== I have entered in variables for the 'from' and 'to' fields to ensure that the above syntax is correct, which it is. However when executing the page it returns no results! Any ideas on this are greatly appreciated as I am well and truely stumped!
  8. I am after a little help with databases and repeated regions. I am currently using Dreamweaver and repeated regions within a php page to display selected information from a MySQL database. However, I would like to be able to display an image in place of an email address, if one exists. Can someone please advise me how to acheive this goal. Kind regards Luke
  9. Chris, you are a genius! Thank you so much for your patience and expertise...
  10. Let me start again.... I want to be able to take data from the MySQL db and present this using a table of. As you will see from my original post I am using the echo table commands to display these results, which works fine. My first problem is that I want to display the results in a more aesthetically pleasing table. For example I want to create headings for each column, example in original posting. Also, to create coloured alternates for the results, E.g. result one has a background colour of blue, result two has a background colour of red, result three background colour of blue..... Because I will be displaying a description for each result I want to be able to code in a predefined scrollable area for each description. Lastly, I want to be able to set a specific height size for each result, to allow for easy viewing. I hope this makes more sense, and apologies for my lack of definition. Kind regards Luke
  11. I am in need to some help with my PHP & MySQL table. The below code is what I am currently using to display information from my MySQL db. However this table looks a bit of an eyesore. I want some help in making this table look a little nicer as well as adding headings for the respective fields. For example I would like the table to look like so: Name > Description > Price Mr A > Mr A is a genius > £400 Mr B > Mr B is a not genius > £600 Mr C > Mr B is a not genius >£1,600 I would also like to set each results description to be a scrollable area so that I then in turn set a predefined width and length for each result. Hope this makes sense. Luke echo "<table cellspacing='15'>"; echo "<tr><td colspan='4'><hr></td></tr>"; for ($i=1;$i<=sizeof($petInfo);$i++) { $f_price = number_format($petInfo[$i]['Price'],2); echo "<tr>\n <td>$i.</td>\n <td>{$petInfo[$i]['Name']}</td>\n <td>{$petInfo[$i]['Description']}</td>\n <td align='right'>\$$f_price</td>\n </tr>\n"; echo "<tr><td colspan='4'><hr></td></tr>\n"; } echo "</table>\n";
×
×
  • 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.