Jump to content

Ferenc

Members
  • Posts

    94
  • Joined

  • Last visited

    Never

Everything posted by Ferenc

  1. http://us2.php.net/manual/en/function.exif-read-data.php [code]<?php echo "test1.jpg:<br />\n"; $exif = exif_read_data('tests/test1.jpg', 'IFD0'); echo $exif===false ? "No header data found.<br />\n" : "Image contains headers<br />\n"; $exif = exif_read_data('tests/test2.jpg', 0, true); echo "test2.jpg:<br />\n"; foreach ($exif as $key => $section) {   foreach ($section as $name => $val) {       echo "$key.$name: $val<br />\n";   } } ?> [/code]
  2. [code]echo "<br /><a href=\"display_exhibits1.php?id=".$row['serviceid']."\">" .$row['exhibit']. "</a><br />";[/code] you needed to fill in the rest, hence the ........
  3. You would need to pass id to the second page [code]<a href=\"display_exhibits1.php?id=".$row['serviceid']."............[/code]
  4. $row contains all the data for each result so it should be easy to display what you need dynamicly
  5. [code]echo "<br />" .$row['row to display']. "<br />";[/code] displays the record... ad the link there [code]echo "<br /><a href=\"where ever you want to go.page\">" .$row['row to display']. "</a><br />";[/code]
  6. do you understand how the code I posted displays what you want?
  7. fill in your db info correctly and this will work [code]<?php for ($i = 'A'; $i != 'AA'; $i++){ echo "<a href = \"?search=$i\"> $i </a>"; } if(isset($_GET['search']) && $_GET['search'] != ''){ // connect to db $db  = mysql_connect('localhost', 'user',  'pass') or die(mysql_error()); $dbi = mysql_select_db('db_name', $db) or die(mysql_error()); $search = $_GET['search']; $sql = mysql_query("SELECT * FROM table_name WHERE table_row LIKE '$search"."%'") or die(mysql_error()); while ($row = mysql_fetch_array($sql)){ // display results echo "<br />" .$row['row to display']. "<br />"; } } ?>[/code]
  8. <?php echo $array_name['items']['0']['title']; echo $array_name['items']['0']['link']; echo $array_name['items']['0']['description']; ?> If you need to show each item you will needd to create a loop of some sort
  9. The backticks where addressed in posts previous to mine. Since the query was placed in the variable it cannot execute until called. [code]if (!$result) {   die('Invalid query: ' . mysql_error()); }[/code] My question to Grega, does the page display an error? If it does, the query is executed, and the backticks cause the problem.
  10. $_POST['$submit_information'] remove the $
  11. As far as I can tell Your code never executes the query. [code]$result = mysql_query($query) or die(mysql_error());[/code] change to [code]mysql_query($query) or die(mysql_error());[/code] If you need $result you will have to call the query in a if statement, or some other manner
  12. [code] <? if (isset($_POST['submit_data'])) {   // process data   echo "Test completed!";   //  end the script   exit; } // display form if submit_data was not set ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">...........[/code]
  13. the easiest method to send sms is basic email. You would need to know the service provider for the person you want to message. AT&T Wireless number@mmode.com               http://www.mymmode.com/messagecenter/ Cingular          number@mobile.mycingular.com  http://www.cingular.com/sendamessage Nextel            number@messaging.nextel.com http://messaging.nextel.com/ Qwest            number@qwestmp.com         http://www.qwestmp.com/ Sprint PCS      number@messaging.sprintpcs.com  http://messaging.sprintpcs.com/ T-Mobile        number@tmomail.net               http://www.t-mobile.com/messaging/ Verizon          number@vtext.com                 http://www.vtext.com/ The problem you will run into would be replys.
  14. You cane use $_GET, or $_REQUEST to aquire the id passed in the URL [code]$job_id = $_GET['detail']; // query database $sql = mysql_query("SELECT * FROM job_details WHERE id = '$job_id'"); [/code]
  15. Your code is fine, something is not right with your server if it isn't working for you.
  16. [quote]  1. PHP has a low barrier to entry.   2. PHP costs nothing to deploy commercially.   3. PHP has all of the documentation needed to learn it efficiently and correctly.   4. PHP has a universally recognized certification for professionals.   5. PHP has a track record of success in all scales of successful enterprises (even if those enterprises don’t like to admit it). PHP 4 was certainly at least as effective as ASP 3-4, JSP, Cold Fusion and Perl.[/quote] Here are some links to a few case studies... [url=http://phplens.com/phpeverywhere/node/view/15]http://phplens.com/phpeverywhere/node/view/15[/url] [url=http://www.zend.com/zend/cs/#CaseStudies]http://www.zend.com/zend/cs/#CaseStudies[/url]
  17. You need to echo $options_t within the while loop. while ($row=mysql_fetch_array($result)) {     $id=$row["id"];     $value=$row["Type"];     echo "<OPTION VALUE=\"$id\">".$value.'</option>'; } why it doesn't display the first record is because $options_t changes with each query ( 2 entries in the database = 2 queries) . when not displayed within the loop it has to display the last result
  18. try using the whole path mkdir("/home2/buy7net/public_html/folder/work", 0777);
  19. this line is causeing the error... [code] <form method="post" action="<?php echo $PHP_SELF?>">[/code] the echo needs to terminate ; [code] <?php echo $PHP_SELF; ?>[/code] The lack of a curly brace will cause a "Unexpected end on line ###" error.
  20. Yes, that is much easier...
  21. $sql = "SELECT * FROM members"; $result = mysql_query($sql)or die (mysql_error()); // get the total $total = mysql_num_rows($result) or die (mysql_error()); // get a random id from the data base.. // begin for loop for($i = 0; $i < 5 ;$i++){ $rand = rand(1,$total); $sql .= " WHERE ID = '$rand'"; $rand_sql = mysql_query($sql) or die (mysql_error()); while ($output = mysql_fetch_array($rand_sql)){ echo $output['membername']."<br>"; echo $output['location']; } // end for loop }
  22. [!--quoteo(post=386059:date=Jun 20 2006, 09:46 AM:name=ben_stringer)--][div class=\'quotetop\']QUOTE(ben_stringer @ Jun 20 2006, 09:46 AM) [snapback]386059[/snapback][/div][div class=\'quotemain\'][!--quotec--] hah ill try that thanks m8 exelent thnaks you just one last thing how can i do it so it dose it 5 times?? selects the random id 5 times and echos all 5 results? thanks -ben [/quote] place it in a for loop for($i = 0; $i < 5 ;$i++){ //code to display 5x }
  23. Something like this would work, as long as the id's are numerical, and don't have gaps in them (1,2,5,6 will error periodicly). [code]<?php $sql = "SELECT * FROM members"; $result = mysql_query($sql)or die (mysql_error()); // get the total $total = mysql_num_rows($result) or die (mysql_error()); // get a random id from the data base.. $rand = rand(1,$total); $sql .= " WHERE ID = '$rand'"; $rand_sql = mysql_query($sql) or die (mysql_error()); while ($output = mysql_fetch_array($rand_sql)){     echo $output['membername']."<br>";     echo $output['location'];      } ?>[/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.