Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. You do know that if there is money changing hands at any point during this then you will get shot dead by the tax man if you use randomly generated order numbers or invoice numbers?
  2. I dont see any malformation in the header From: line (although I will assume the address is an exepler) perticularly if the Reply-To is working without a problem. What seems most likely is that the SMTP server has MX record send restrictions (i.e. if the IP address the mail is coming from does not resolve to the same global IP address as the domain MX record used in the From header it will treat it as spam.) have you tried setting error_reporting(E_ALL) at the top of the page to see if it will show anything new?
  3. $row[] is an array, why make another? And have you considered using your SQL query to return what you want rather than just the content info?
  4. What's the actual error? And have you considered that the new servers SMTP setup could be at fault?
  5. seems like the if(empty... is wrong, flings up an error when I run the script on my server. change it to if(trim($q) == ''){ also at the verry top of the page add this line of code <?php error_reporting (E_ALL); //... this should help with any other errors in the php.
  6. Your form's a little wrong. Try changing to this: <?php $query = "SELECT categoryID AS ci, categoryName AS cn FROM category ORDER BY categoryName"; $result = mysql_query($query) or die (mysql_error()); echo '<form method="get" action="/biblio/">'; echo '<select name="showcat">'; echo'<option value="">Choose category</option> while ($row = mysql_fetch_array($result)) { $id = $row['ci']; $cat = $row['cn']; echo'<option value="'.$id.'">'.$cat.'</option>'; } echo '</select>' echo '<input type="submit" value="Search" />' echo'</form>' ?> Also never open php tags with just <? it's not common for modern servers to support short tags for php so as a best practice you should always use <?php to open them.
  7. As it's an int unquote it in the update query. you are basicly telling the query the input is a string, and then trying to compare that to a coluim in your database that you have told the database isn't allowed string values in the first place.
  8. I just answerd his question, never said it would solve the problem. I find it is better to find these things out for yourself, that way it sticks better.
  9. I think you'r looking for somthing like this http://uk.php.net/manual/en/function.file-get-contents.php
  10. http://php.net/manual/en/function.unset.php
  11. add this at your second line in ajax.php (just after $q = $_GET['q'] : if (empty(trim($q))){ $append = ''; } else{ $append = ' AND car_quantity = '.$q; } and change the query to read : $sql='SELECT car_number FROM cars WHERE customer_name = \''.$cname.'\''.$append; is that more what you are looking for?
  12. Can you give a little more info in the way you are planning the deployment of this? How are the databases going to be set up? What level of access to your database will be available from the client servers?
  13. You don't need a join when you are only using 1 table. $sql='SELECT car_number FROM cars WHERE car_quantity = '.$q.' OR customer_name = \''.$cname.'\''; $result = mysql_query($sql) or die (mysql_error()); should do just fine.
  14. Here's some commented code on how to do it in php: <?php if (!isset($_POST['text1'])) //check to see if first load of page { $text2 = '<textarea name="text2" readonly="true"></textarea><br>'; //show empty text area if first load } else{ $text_content = $_POST['text1']; // when not first load assign text from text area1 to this variable $text2 = '<textarea name="text2" readonly="true">'.$text_content.'</textarea><br>'; //show text area with text from first text area in it } echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" type="submit">'; // reload this page when button is clicked echo '<textarea name="text1"></textarea>&nbsp'; //make first text area echo $text2; //make second text area echo '<input type="submit" value="Move" />'; //make button to perform proccess echo '</form>'; //end the form ?>
  15. I havn't tried anything like that myself, but I think you will need to use client side scripting on the onChange attribute of the first text box to get the result you are looking for in the second to apear without sending the form back to the server for pre-proccessing.
  16. Are you calling the session_start in connect.php as well by chance?
  17. Just make a condition for that row to only display on the first run through the loop : $result = conn($sql); if (!$result){ die("No results due to database error.<br>".mysql_error()); } if (mysql_num_rows($result)==0) { echo "No Results found!"; }else{ echo "<TABLE width=100% height=300 border='1' cellpadding='5' cellspacing='2'>"; $first_run = "true"; while ($rows= mysql_fetch_array($result)) { echo "<TR>"; if ($first_run == "true"){ echo "<TH colspan='5' scope='colgroup'>Resultat for: <scope='row'>". $rows['beha'] .", ". $rows['omraede'] .", ". $rows['pr'] ."</Th>"; $first_run = "false"; } echo "</TR>"; echo "<TR>"; echo "<TH scope='col' abbr='beha'>Beha</TH>"; echo "<TH scope='col' abbr='rating'>Rating</TH>"; echo "<TH scope='col'>Kommentar</TH>"; echo "</TR>"; echo "<TR>"; echo "<TD width=20% height=100 scope='row'>". $rows['beha'] ."<p> ". $rows['navn'] ."<p> ". $rows['adresse'] ."<p> ". $rows['postnr'] .", ". $rows['by'] ."<p> ". $rows['tlf'] ."</TD>"; echo "<TD width=30% height=100>". rating_bar($rows['id'],'6','static')."<a href='jadak.php?id={$rows['id']}&navn={$rows['navn']}&pr={$rows['pr']}&beha={$rows['beha']}'>Bedøm </a> </TD>"; echo "<TD width=30% height=100><a href='komment.php?navn={$rows['navn']}&id={$rows['id']}&beha={$rows['beha']}'>Læs kommentarer</a> </TD>"; echo "</TR>"; } echo "</table>"; }
  18. You have closed your foreach before it's done anything. treat it like a while loop. foreach($lines as $line) { //you had a ; at the end here list($title, $infobox) = explode('-', $line); echo '<li><h3>'.$title.'</h3><span><p>'.$infobox.'</span></li>'; } //close the loop ?>
  19. The easy, server heavy workaround would be to re-post off every single page using hidden form fileds, although it would be better to see if you can "export" the POST returns to an intermediary page using headers and include it throughout. Slightly more interesting way would be to create a new table and a new db user login that only has limited access to that table. Use the table as a temp store for the form info, deleting it on successful login (keeping an audit of failed login atempts), or on both successful and failed logins for more security. This way if anyone manages to compromise your login credentials, they will get nothing for it.
  20. quick fix = embed the music player in 1 tiny iframe and the rest of your pages in another big one have your navigation processed only by the big iframe.
  21. start your page with: <?php error_reporting (E_ALL); //your code here ?> That should then have the page display the error message rather than just being blank.
  22. Flash can't send a cookie to php because php is on the server, not the client computer, and if everyone fed the server cookies it would get fat and slow. your options depend on how you are passing the variable to the Flash and how the variable is established before it is passed.
  23. Looks as though it is used in the same way as the % symbol is in windows eg if you open up command prompt and type cd %windir% then no matter what folder you are curently in it will take you to the folder that has your windows instalation in it (normaly c:\windows). Basicly it should use system refferencing to establish the directory rather than absoloute refferencing. That's just what it looks like to me though, I'm probably wrong.
  24. is proposalID a varchar or an int? and does it have a valid value in it when you echo it out?
  25. Now, I know recycling variables is normaly not a bad thing....but $q is taking some serious abuse in that code.
×
×
  • 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.