Jump to content

budimir

Members
  • Posts

    522
  • Joined

  • Last visited

Everything posted by budimir

  1. Hey ther, Actually using ODBC driver is very easy. First of all, you need to select odbc driver and create an odbc connection. You go to Control Panel, click on Administration tools, then click on Data Sources (ODBC). When the window opens up, click on a tab called System DSN. Click on ADD, select Driver to MS Access. When the second window opens up put a name in "Data source name" (this is the name which you will use for calling the connection for the ODBC driver), click on SELECT and choose where your Access database resides. After that click on OK and you are set to go. Now, create a PHP script and put in a connection line like this: $cx=odbc_pconnect("Data_source_name","","",""); And after this, you handle it like normal PHP + MySQL code. Of course the code is a little bit diferent, but there is a lot information about this on the web. Here is a sample of query: $cur=odbc_exec($cx,"select Oznaka,Naziv,JedinicaMjere,Pak,TarifnaSkupina,Dobavljac,Klasa,Vrsta,MinKol,MaxKol,OptKol,Cijena1,Cijena2, AVal,ACijena3,ACijena4,AVal2,ASkSmj,Altsifra,ARab,AdrPor,Barcode from TblArtikli"); I hope you got an idea. How to work with it. This is very basic.
  2. if you posted your database structure it would be much easier. But basicly you could do: $sql = "SELECT * FROM table_name WHERE id='$id' ORDER BY date DESC"; So this would be the last date when the change was made for that ID. And then you could do the check to see when was last change was done and send an email.
  3. You can use md5() to rename your file! That will do the trick.
  4. Yup, that's right! But I'm deleting all the records from database where I had no activites for Last 7 days. That's how I'm keeping the database clean. Also a lot of my users are putting things in the basket through the week, so this proved to be the perfect way. At least in my case. Again, it depeneds on the purpose!
  5. Maybe that would be the best way. But it depends on what are your needs. I have developed an e-commerce where I'm leaving everything in the basket until checkout, so user has some time to think through if that is the complete order and when he want's to send it.
  6. And where is your move_uploaded_file in the script????? You are not uploading file for now!
  7. OK, It looks good for now, but I would recomend to put PREVIOUS so you could go back.
  8. Try to change this: $site['url'] = 'http://www.mesquitechristmas.com/local/display.php?id=$id'; To this: $site['url'] = 'http://www.mesquitechristmas.com/local/display.php?id='$id'';
  9. Hosting service! By the question you are asking here, I would say you don't have a clue what are talking about. If you don't which software to use to run a server, how the hell are you going to protect the data from the sites you're going to host? Think it through!
  10. You could use limit option in your query. But the thing you are asking for is pagination! So try to lookup at google, or through the forums. There was a lot of discussions about it.
  11. Try this $query = "SELECT * FROM nxg_member WHERE username='$_GET['username']'";
  12. I think the problem is with your php.ini settings. Try setting max_execution_time = 1 000 000 000 max_input_time = 6 000 000 000 memory_limit = 800 M I had the same problem and this solved it. Try it out. And you must restart Apache after making these changes, otherwise it doesn't matter. Good luck
  13. budimir

    help

    Do it like this 1. Create a form (method post) call a file like continue.php 2. Put two checkboxes 3. Put one submit button 4. One checkbox can be called I agree and value="I Agree" 5. Second checkbox can be called No and value="No" 6. Put some code in continue.php like: if ($checked == I agree){ header("Location:somepage.php"); } else { header ("Location: #"); } The code is not completly done for you. Try to play a little bit. I gave a hint how to do it.
  14. budimir

    help

    Did you use any code for redirecting? If yes, post it, so we can take a look!
  15. $sql = "SELECT * FROM comments WHERE id = '$id'"; $query = mysql_query($sql); $num_rows = mysql_num_ros($query); [color=red][font=Verdana]//Here is numrows now, but you didn't have it before, so I don't see how are you getting an error from this file when you are not using mysql_num_rows. You are probably getting error message from another file[/font][/color] $site['url'] = 'http://mesquitechristmas.com/local/display.php?id=$id'; $PageNav = swPagination( $Sql, $MRPP = $limit, $UriAdd = $site['url'], $SortByAllow = FALSE, $SortOrderSeed = FALSE ); $result = $PageNav['RowList']; #Don't think you need the stuff above IF ( !$PageNav['TotalRes'] ) echo("Nothing to Display!"); $i = 0; while ($row = mysql_fetch_array ($result)) { $color = ($i%2== 0 || $i == 0)?'#DDDDDD':'#EEEEEE'; $id[$i] = $row["id"]; $firstname[$i] = $row["firstname"]; $location[$i] = $row["location"]; $comment_date[$i] = $row["comment_date"]; $comment[$i] = $row["comment"]; print"<tr bgcolor='".$color."'> <td align='left' width='120'><strong> Name</strong>: $firstname[$i]</td> <td align='left' width='120'><strong> Location</strong>: $location[$i]</td> <td align='left' width='216'><strong> Date</strong>: $comment_date[$i]</td> </tr> <tr bgcolor='".$color."'> <td class='commentBorder' colspan='4'><strong> Comment</strong>: $comment[$i]</td> </tr>"; ++$i; } } } ECHO $PageNav['HrefNav']; } // end code for displaying comments Can you send me both of this files on my mail? So I can check them out. We are obivously missing something out!
  16. I think you are having problem with your query $sql = "SELECT * FROM comments WHERE id = $id;"; Do it like this $sql = "SELECT * FROM comments WHERE id = '$id'"; You have an extra ; in your query and put your $id variable in '$id ' Let us know if that was the problem!
  17. Hey superdude, Try this peace of code, it will in 2 columns: echo "<table cellspacing=7 border=0 cellpadding=3><tr valign=bottom>"; $i=1; while ($row = mysql_fetch_array($rezultat)){ echo "<td align=center width='25%' valign=top>"; if ($row["imgdata"]) echo "<a href='images/".$row["imgdata"]."'><img border=0 src='images/".$row["imgdata"]."' alt='".$row["title"]."' witdh='100' height='100'><br><div style='font-size:1px; margin-top:4px;'> </div><a href='images/".$row["imgdata"]."'>"; echo $row["title"]; echo "</td>"; if ($i%2==0) echo "</tr><tr><td> </td></tr><tr valign=bottom>"; // If you put instead 2 number 4 you will get 4 columns $i++; } echo "</tr></table>"; Let me know if that is what you wanted!
  18. Did you try to test your mail() function and check if it's working? It needs to be setup!
  19. Try to check in your php.ini file the max_exec_time Change the value to 10000 or something like that. After that restart apache and try again!
  20. When you are using header you can not send an output to the browser because you will get the error which you are getting. So you can't use echo or print. Neither you can send html output. It need's to be clean PHP code, without output and on the end header.
  21. $name_variable = (isset($_POST['checkbox_name']) ? 1 : 0); Try using VARCHAR in SQL not BOOL, it's much simplier. Maybe bool is causing all of your problems!
  22. Hey Daniel, I agree with you about WYSIWYG, but for a newbie is the easiest way to do some things.
  23. You'r problem is actually pretty simple. To help you out, you just need to post you SQL QUERY. There is your problem, so that would be something like: $sql = "SELECT * FROM table"; Give us the code, and we will help you out. You don't need to get nervous.
  24. OK, so it seems that you need to dig deeper. Try using error reporting like: $result = mysql_query($sql) or die(mysql_error()); And see the error message you get!
×
×
  • 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.