Jump to content


  • Posts

  • Joined

  • Last visited

edwind's Achievements


Newbie (1/7)



  1. Thankyou JamesB. I had come to realise the error with the quotes but I had no idea about the missuse of the WHERE attribute. Thanks for that too but the problem I have is to call captions and prices to accompany their images placements in a table. They will not always follow an array numerically so the integer method will be unsuitable I guess.Also, having corrected all the instances of double quotes, I now get denied access because of;[error]Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Inetpub\vhosts\weekdayweddings.net\httpdocs\asptestquerypage\Index.php on line 18Could not connect: Access denied for user 'ODBC'@'localhost' (using password: NO)[/error]The question here is how do I find my server path. I've tried using the same path as I use for ftp transfer but that doesn't work (which is why I resorted to the generic 'localhost:3306')?
  2. I cannot get past this error code;Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in C:\Inetpub\vhosts\weekdayweddings.net\httpdocs\asptestquerypage\Index.php on line 34The code I've used is <?php$user_name = "";$password = "";$database = "";$server = "localhost:3306";$con = mysql_connect($server, $user_name, $password);if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("testcall", $con);$result = mysql_query("SELECT * FROM Stock No");$result = mysql_query("SELECT * FROM Price");while($row = mysql_fetch_array($result)) echo "<table border='1'><tr><th colspan="2" align="center"><img src="images/A0001.jpg"></th><th colspan="2" align="center"><img src="images/A0002.jpg"></th></tr>";while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td align="left">" . $row['Price WHERE Listed="1" '] . "</td>"; echo "<td align="right">" . $row['Stock No WHERE Listed="1" '] . "</td>"; echo "<td align="left">" . $row['Price WHERE Listed="2" '] . "</td>"; echo "<td align="right">" . $row['Stock No WHERE Listed="2" '] . "</td>"; echo "</tr>"; }echo "</table>"; mysql_close($con);?> Line 34 is the first line that begins................ echo and is all on one line in the codeI have checked and rechecked the quote marks but they all seem to follow the proper 'pairing' rules.I assume that I am making the right connection to the database?The page can be found at www weekdayweddings net website in the root folder asptestquerypage (Sorry if I should not post this, I couldn't find the rules on u r l s.grateful for any help,edwind
  3. edwind

    login script shaky

    Hi, Having finally found a workable login script that allows me to have multiple usernames and passwords in a database for members area I now find that once someone has logged in, all they have to do is copy the address bar of the browser then they can share that url with others who are not members for easy access. Surely there is way around this?
  4. Thankyou for your response. I have to apologize. I am afraid I used an asp script not php. I need to ask this question elswhere.
  5. Hi, I'm currently using an excellent php script to password my page but once 'in' the user can copy the url from the address bar and reuse it anytime (including sharing it) without logging in again. Surel this is nt right? How can I protect my page ensuring that every visit needs to login?
  6. Thankyou for your reply 'thescientist' but you just made me feel like I'd been slapped with a wet fish. I did not understand a word.However, by trying to solve the problem myself I have found that putting 'target="_blank"' in the opening form command, I acheive exactly what I want with Firefox but IE simply reports 'Invalid file'. Can anyone please help around this little problem. And please no jargon! I am but a simple photographer with an interest in doing my own website.
  7. I have a simple form to upload images but the action="upload_file.php" opens a new(replacement) window and when that window is closed I lose the page I was on. I need to return to the original window. PHP being server side gives me a problem of directing the user so I would like to change the html in the original form to set the action to open the php result in a new(additonal) window and set the window size to small such as width="300" and heigh="200" so that the original wondow can still be seen underneath.Can I set 'target' within the form action html?
  • Create New...