Jump to content

gterre

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Everything posted by gterre

  1. Hello all, I have an upcoming project where the php app must read and write to a remote sybase server. I have no Idea where to start as I've only worked with Oracle and MySQL. If someone can point me in the right direction that would be great. Thanks
  2. You should establish a connection to the database before performing any queries.
  3. use a css style sheets. You can position a layer on top of the video using the zindex property. Just code an image in that layer and your set. Do some research on stylesheets.
  4. I have the same problem, I tried replacing \n, \t, \r with '' But for some reason, when I export my files to excell, the comment fields that contained the \n \t \r, resulted in a new line. I would like to strip a field from all formatting chars. html entities does not work...
  5. I'm just curious what code he took out or fixed. The solution could probably help us out in the future and create some kind of awareness. Please post the solution if you can.
  6. Try This <?php echo '<img src="checked.gif">'; echo '<img src="http://localhost/ARB/checked.gif">'; ?>
  7. Is there any way I can capture data from a fax machine using PHP? I do not need a solution for faxing, I need a solution for capturing the data whenever a document is faxed directly to the fax machine. Thanx
  8. just a note... the input name for your checkboxes should change so you can isolate the values. example... <input type="checkbox" name="driver1" value="some value"> <input type="checkbox" name="driver2" value="some value"> <input type="checkbox" name="driver3" value="some value"> <input type="checkbox" name="driver4" value="some value"> <input type="checkbox" name="driver5" value="some value"> That way you can have. $value1 = $_POST['driver1']; $value2 = $_POST['driver2']; $value3 = $_POST['driver3']; etc....
  9. play with this..... <?php include("nascarconnect.php"); echo "<html><head><title>All Drivers</title></head><body>"; $query = "SELECT * FROM AllDrivers ORDER BY salary DESC"; $result = mysql_query($query) or die ("Couldn't execute query."); ?> <div align=center> <table width=100% cellpadding=0 cellspacing=0 border=0> <tr> <td width=10%></td> <td width=80%> <form action="15manrosterselection.php" method="post"> <fieldset><legend>15 Man Roster</legend> <b>Please Select 15 Drivers From The List Below.<br><br>Be Shure and Select 15:</b> <table width=100% cellpadding=0 cellspacing=0 border=0> <tr bgcolor=f1f1f1> <td width=33%></td> <td width=33%><b>Name</b></td> <td width=33%><b>Salary</b></td> </tr> <?php while ($row = mysql_fetch_array($result)) { echo' <tr> <td width=33%><input type="checkbox" name="driver" value="'.$row['drid'].'"></td> <td width=33%>'.$row['name'].'</td> <td width=33%>'.$row['salary'].'</td> </tr> '; } ?> </table> <br><input type='submit' value='Submit 15 Man Roster'> </fieldset> </form> </td> <td width=10%></td> </tr> </table> </div> </body> </html>
  10. Thanks for the help, returns are working fine. I had no idea that function existed.
  11. I know that there is probably a way to send data from mysql database to a phone via text messaging. I do not know where to start.. Can anyone push me in the right direction?
  12. this is how i have it set up.. the user inputs text into a textarea field pressing enter on the keyboard for breaks. text goes into the database. using a select query the text is displayed, however the breaks entered by pressing the enter key is not honored and is replaced by a space. I would like it so that the breaks entered into the textarea would be honored and appeared exactly as entered.
  13. use javascript..... example <?php if() { echo "<script>window.open('http://microsoft.com','_blank','')</script>"; } ?>
  14. Hello all, I am having problems displaying text. I have disabled html using htmlentities() however i would like to show returns. Is there any way to do this?
  15. $conn = mysql_connect($dbHost, $dbUser, $dbPassword) or die('DB connexion error'); mysql_select_db($dbName) or die ("DB not reachable"); //query $sql = "SELECT * FROM article "; $query = mysql_query($sql); if (!$query) {               // error handler               echo 'Query failed. SQL: ', $sql, ' Error # ', mysql_errno(), ' Error msg: ', mysql_error();               exit;              } //end of query while ($row = mysql_fetch_array($query)) { $item = $row['ModeleArticle']; echo '<option value='.$item.'>'.$item.'</option>'; } //end loop
  16. How do i do this? according to people online i'm supposed to right click the table and select export to microsoft excel, however when I do this it says, the webquery returned no data. I'm guessing because i'm using sessions. Is there any way where i can put a link for example ..export.. and when the user clicks on it, it will export into an excel document.. I am using the PHP api. Thank you :)
  17. ok i moved the where clause to the end of the query and it still doesn't work.. Do i need to declare my law table in the from clause before declaring the join?
  18. but the query still works if i was to take the left join out, which means that the where clause came before the other joins but it still works... I will try moving the where clause to the end and see what happens
  19. $result = @mysql_query('SELECT TT_number, datetimeend, service, MINUTE(datetimestart) AS startminute, HOUR(datetimestart) AS starthour, DAYOFMONTH(datetimestart) AS startday, MONTH(datetimestart) AS startmonth, YEAR(datetimestart) AS startyear, category, status, priority.order, priority, description, datetimestart FROM troubleticket, priority, category, services WHERE TT_number="'.$tt.'" LEFT JOIN troubleticket ON lawid=law.lawid AND troubleticket.pid=priority.pid AND troubleticket.catid=category.catid AND services.sid=troubleticket.sid '); $row = mysql_fetch_array($result); error is: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\NetTicket\editticket.php on line 16 I want to join my law table to my troubleticket table, my trouble ticket table is the main table.
  20. <?php echo $_SESSION['username']; ?> the session must be started on the beginning of the page prior to using any session variables.
  21. this is what I would put <?php session_start(); $firstname="Daniel"; $lastname="Cheers"; $_SESSION['username'] = $lastname.', '.$firstname; ?>
  22. I'm trying to do a select query with a left join and regular join and keep getting a mysql error. Is this even possible?
  23. Hello, I am stuck on this one problem which I bet is really simple. I am trying to create an edit form which shows the current data in each respective fields. I know its down by assigning the value="" attribute of the form field. however i need to query the database for the record in question and assign the results of the query into variables so i can insert into the value attribute. Can someone give me an example of pulling a query and setting the results for each field into a variable? Thank you this help is much appreciated.
×
×
  • 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.