Jump to content
#StayAtHome ×

All Activity

This stream auto-updates     

  1. Past hour
  2. in this statement, is it supposed to be "FROM result t" or should it be "FROM result" ?
  3. Today
  4. Some one from here helped me create this and i have added to it. Since i have updated my server everything works now except this code. Any help would be great. <?php include("../../db_inc.php"); // define HOST, USERNAME etc $db = new mysqli(HOST,USERNAME,PASSWORD,'roundrobin'); $sql = "SELECT result_id , round_no , roper_id , roper , heeler_id , heeler , time FROM result t INNER JOIN RRroper r ON t.roper_id = r.sid INNER JOIN RRheeler h ON t.heeler_id = h.sid ORDER BY round_no, roper_id"; $output=''; $res = $db->query($sql); $currRound = 0; while (list($resid, $round, $rid, $roper, $hid, $heeler, $time) = $res->fetch_row()) { if ($round != $currRound) { if ($currRound) { // end previous form $output .= "</table></fieldset> <input type='submit' name='btnSub' value='Submit Round'></form></div>\n"; } // start new form for round $output .= "<div class='form'><form method='post' action='roundrobin_updt.php'> <fieldset><legend id='$round'>Round $round</legend> <table border='1'> <tr><th>#</th><th>Header</th><th>Heeler</th><th>Time</th></tr>\n"; $currRound = $round; } $output .= "<tr><td class='ctr'>$rid</td><td>$roper</td><td>$heeler</td> <td class='ctr'><input type='text' name='time[$resid]' value='$time' size='8'></td></tr>\n"; } $output .= "</table></fieldset> <input type='submit' name='btnSub' value='Submit Round'></form></div>\n"; ?> <html> <head> <script type="text/javascript"> jQuery(document).ready(function($) { // Hook up the current state to the nav bar $('.page-navigation').onePageNav(); }); </script> <?php ini_set("display_errors", "10"); error_reporting(E_ALL); include("../../dbinfo.php"); $con = mysqli_connect($host,$username,$password); mysqli_select_db($con, $database7) or die( "Unable to select database"); // Retrieve data from database $sql="SELECT * FROM $tbl_name13 ORDER BY sid DESC LIMIT 1 "; $result=mysqli_query($con, $sql); while($rows=mysqli_fetch_array($result)){ ?> <title>RR <?php echo $rows['d1header']; ?></title> <link rel='stylesheet' type='text/css' href='../../tracklog.css'> <style type="text/css"> body { font-family: sans-serif; font-size: 12pt; background-color:#666; } table { margin-left: auto; margin-right: auto; width: 90%; /* border-collapse: collapse; */ } th { color: black; background-color: #369; padding: 5px 3px; } td { background-color: white; font-family: sans-serif; font-size: 12pt; padding: 0 3px; color: black; t } td.ctr { background-color: #ccc; text-align: center; width: 100px; } div.form { background-color: #CCC; margin-bottom: 10px; margin-left: auto; margin-right: auto; padding: 5px; width: 900px; text-align: center; } legend { padding: 3px; background-color: #369; color: white; } fieldset { text-align: left; } input[type='text'] { text-align: right; } h1 { text-align: center; } </style> </head> <body> <div id="top"></div> <h1><?php echo $rows['d1header']; ?></h1> <?php } ?> <?php // close connection mysqli_close($con); ?> <scroll class="site-navigation page-navigation1"> Quick Scroll <ul class="menu"> <li><a href="#top">R1</a></li> <li><a href="#2">R2</a></li> <li><a href="#3">R3</a></li> <li><a href="#4">R4</a></li> <li><a href="#5">R5</a></li> <li><a href="#6">R6</a></li> <li><a href="#7">R7</a></li> <li><a href="#8">R8</a></li> <li><a href="#9">R9</a></li> <li><a href="#10">R10</a></li> </ul> </scroll> <h1>Round Robin Event</h1> <div> <?php =$output ?> </div> </body> </html>
  5. Yesterday
  6. We are now dealing with following 2 tables: 1. Source Table: wp_vxcf_leads_detail 3. Additional Table: wp_vxcf_leads These tables don't have a declared relationship however the "id" field of "Additional Table" is being used as the "lead_id" in source table.
  7. You are the man!! That did it, I removed the white space & it works like a top . I've been working on this for three days & couldn't figure out what I was missing. Thanks again
  8. Make sure there is no whitespace before the opening <?php. Absolutely nothing at all. If you're sure you've removed everything, make sure your editor is not saving files in UTF-8 with BOM format. UTF-8 is fine. BOM is not.
  9. Also the" xdata/tables.php" is the only path that I'm using but I guess all the path in front is because I'm on a shared server. For security reasons I changed a few numbers in the path but not the format.
  10. You should be getting at least a notification as the 'status' array in the response doesn't have a 'tickets' index. Check your data nodes before attempting to output anything, and make the code more explicit in what it's trying to do: $return = json_decode($response, true); if($return['status'] == 'success' && !empty($return['data']['tickets'])){ foreach($return['data']['tickets'] as $ticket){ echo $ticket['ticketNumber'].' - '; echo $ticket['title'].' - '; echo $ticket['content'].'<br />'; } } If the call fails, I assume 'status' will not be 'success' and 'tickets' will be empty - the above will stop your program from crashing at that point.
  11. Here is the message that is displayed at the top of the same page where the text of the file is displayed:
  12. Licensing in this sort of situation is often handled by restricting how many user accounts can be active at once. Assuming your application deals with user accounts, of course. Another scheme is to restrict or limit how much data can be read in the database. You don't stop storing information, you just don't let people access all of it. Like, only showing the most recent. Related to that, you can also limit access to a resource. A fixed number of page views per day, or a number of downloads per assets, or total downloads, or something like that. And of course there's the most obvious one: to limit what features are available to use. Especially suited to complex applications that have a lot to offer.
  13. Ok, I understand. So there's no way to do this. Good to know. Thanks for your comments. Sincerely
  14. You want to know if the server can download an EXE to the user's computer and run it, without them knowing? Think about what you're asking. I'm sure you can come up with the correct answer.
  15. The client will enter information into a form and click ok. But it maybe doesn't help. But is there no way the php program could download an exe program to the clients PC that could read the registry and transfer the variable to a php variable?
  16. It could be a settings problem, sure, but it could just as easily not be a settings problem. Add error_reporting(-1); ini_set("display_errors", true); at the top of the file and see what happens.
  17. The code in the last post is pretty much it. That is where the problem lies. I tried taking away the if statement & substituting the name of a table so i could run that file by itself & it works fine on my server. I do the same thing on my web host server & instead of the file downloading it displays the full text of the file on the screen. I'm starting to think that there is nothing wrong with the code & that there is a problem with my web host settings. If you or anyone here using a mysql database can test this code on your server I would appreciate it. <?php $_table="table1"; // gets the table name from first page include ("mysql_login"); // opens mysql with $con as the database variable header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=table.csv'); $output = fopen("php://output", "w"); fputcsv($output, array('id', 'First_name', 'Last_name', 'email', 'phone')); $query = "SELECT * from $_table ORDER BY id ASC" or die ("Help"); $result = mysqli_query($con, $query); while($row = mysqli_fetch_assoc($result)) { fputcsv($output, $row); } fclose($output); ?>
  18. Okay, that's what I thought. You cannot read registry settings from the client browsing the website. You can only access the registry from the server PHP is itself running on. And obviously only if it's a Windows machine.
  19. The code will be on the server of the host, and the client run it from a web-site they visit.
  20. Okay, let's go back a step. Who will own the server that this code will be running on? The client? Is it their server? Or is the code hosted somewhere the client cannot control and they use their browser (or some other means) to access/use/whatever it?
  21. How does wp_vxcf_leads relate to the source table?
  22. structure and data of my tables i am working with now. there are some fields i am not using now but included in the php file.
  23. Target table, created and populated by the modified query.
  24. Structure and data of table "wp_vxcf_leads_detail", the source table.
  25. I don't quite understand what you mean by that, as the PHP code can be hidden on the server. Can you explain some more?
  26. there is option in the db if the staff no longer in the company to delete his staff records and will no longer be considered in the attendance system.
  27. Barand I thought lead_id could be used to determine the order of entries, however, it would be great if we could get the timestamp which is stored in another table called "wp_vxcf_leads". Following is the structures and data stored into this the second table.
  28. Keep in mind that PHP code is open-source, so if somebody wanted to circumvent your registry key licensing checks, they could do it really easily. Like, in the time it takes me to microwave last night's leftovers. win32std It looks pretty old, though, so you might have to find an alternative. Like a shell command.
  1. Load more activity
  • 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.