Jump to content

sasa

Staff Alumni
  • Posts

    2,804
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by sasa

  1. try <?php $url = 'company.com'; preg_match('/([^\.\/]+\.[^\/\.]+)((\/)|($))/', $url, $b); echo $domain = $b[1]; ?>
  2. try SELECT * FROM mytable ORDER BY ranks+0;
  3. try $Name = Trim(stripslashes($_POST['Name2'])); $Tel = Trim(stripslashes($_POST['Tel2'])); $Email = Trim(stripslashes($_POST['Email2'])); $Website = Trim(stripslashes($_POST['Website2'])); $Message = Trim(stripslashes($_POST['Message']));
  4. try to change line <input type=hidden name=comparr value=" . serialize($newarray) . "> to <input type=hidden name=comparr value='" . serialize($newarray) . "'>
  5. try $num_colum = 2; <table> while($row=mysql_fetch_array($results)){ echo "<tr><td>" echo $row['results']; echo "</td>; for ($i = 1; $i < $num_colum; $i++) { echo '<td>', $row=mysql_fetch_array($results) ? $row['results'] : ' ', '</td> } echo "</tr>"; } </table>
  6. try ALTER TABLE `messages` ADD `ReportedOn` TIMESTAMP NOT NULL DEFAULT 0 AFTER `ReportedBy`
  7. try http://www.google.com/search?q=open%20source%20file%20browser%20php
  8. try <?php $a ='asd.grrt//fdgfdh/gnggf.j/fdh.ztu.htu.lll'; preg_match('/\.([^\.]+)$/',$a,$b); print_r($b); ?>
  9. i ztry on my localserver 1st file <?php //$sql2 = "SELECT DISTINCT * FROM `Teacher` ORDER BY ST_Surname ASC"; // include("../includes/php/connect2.php"); echo "<form method = 'post' action = $PHP_SELF>"; echo "<table>"; echo "<tr>"; echo "<td>"; echo "<strong>Please select recipients</strong>"; echo "</td>"; echo "<td>"; echo "<select name = 'multiple_recipients[]' multiple = 'true' size = 6>"; for ($individual = 1; $individual <10; $individual++)echo "<option value = $individual>$individual</option>"; // while ($row2 = mysql_fetch_assoc($rst2)) // { // $individual = $row2['ST_Code'] . " - " . $row2['ST_Surname'] . " " . $row2['ST_Forename']; // echo "<option value = $individual>$individual</option>"; // } echo "</select>"; echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>"; echo "<input type = 'submit' name = 'submit' value = 'Select recipent(s)' />"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "<br />"; if (!$_POST['submit']) {} else { $recipients = ($_POST['multiple_recipients']); echo "<table border = '1'>"; echo "<tr>"; echo "<td>"; echo "<label><strong>Recipent(s)</strong></label>"; echo "</td>"; if (is_null($recipients)) { echo "<td>You have not selected any recipients!</td>"; } else { foreach ($recipients as $a_recipient) { echo "<td>".$a_recipient."</td>"; } } echo "</tr>"; echo "</table>"; echo "<table>"; echo "</form>"; echo "<br />"; echo "<form method = 'post' action = 'send_individual_msg.php?recipients=".serialize($recipients)."'>"; //echo "<input type = 'hidden' name = '$recipient' value = '$recipient' />"; echo "<table>"; echo "<tr>"; echo "<td>"; echo "<strong>Subject</strong>"; echo "</td>"; echo "<td>"; echo "<input type = 'text' name = 'subject' size = '56' maxlength = '56' />"; echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>"; echo "<strong>Message body</strong>"; echo "</td>"; echo "<td>"; echo "<textarea name = 'message' cols = '43' rows = '6'></textarea>"; echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>"; echo "<input type = 'submit' name = 'submit' value = 'Send message' />"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "</form>"; } ?> and 2nd file <?php $recipients = unserialize($_GET['recipients']); $subject = $_POST['subject']; $message = $_POST['message']; /*$recipient_a = $recipients[1]; $recipient_b = $recipients[2]; if (!$recipient_b) { $recipient_b = "";} echo $recipient_a; echo $recipient_b; */ $r_a = $recipients[0]; echo $r_a,'<br />'; $r_b = $recipients[1]; echo $r_b,'<br />'; //echo $recipients; echo $subject,'<br />'; echo $message; ?> uotput of 2nd file is 2 first recipients + subject and message
  10. FreeBSD use 32-bits integer and CentOS 64-bits
  11. try <?php $_SESSION['firstname'] = $_POST['firstname']; $_SESSION['lastname'] = $_POST['lastname']; $_SESSION['username'] = $_POST['user']; $_SESSION['password'] = $_POST['pass']; $_SESSION['address'] = $_POST['address']; $_SESSION['county'] = $_POST['county']; $_SESSION['country'] = $_POST['country']; $connection = mysql_connect('157.190.116.250','sheehanl','R00010258') or die(mysql_error()); if ($connection){ $query = "INSERT INTO patients (patient_first_name, patient_last_name, patient_user_name, patient_pass_word, patient_address, patient_county, patient_country) VALUES ('".$_SESSION['firstname']."', '".$_SESSION['lastname']."', '".$_SESSION['username']."', '".$_SESSION['password']."', '".$_SESSION['address']."', '".$_SESSION['county']."', '".$_SESSION['country']."'"; $result = mysql_query($query); echo "New record added to the database";} else echo "connection failed"; $db = mysql_select_db("sheehanldb") or die(mysql_errror()); echo "<p>Database selected</p>"; ?>
  12. are you talking abouth databases or tables?
  13. just in yuor sql add WHERE `Date`>='start_date' AND `Date`<='end_date'
  14. use echo "<form method = 'post' action = 'send_individual_msg.php?recipients=".serialize($recipient)."'>"; and on submit page $recipients = unserialize($_GET['recipients']);
  15. try <?php $array =array('xltd kfjrkls sltd','x LTD kfjrkls sltd','ltd kfjrkls sltd','xltd kfjrkls s ltd v','xltd kfjrkls s ltd '); foreach ($array as $a){ $b = preg_match('/(^|\s)((ltd)|(l\.t\.d)|(sa)|(s\.a))( |$)/i',$a); echo $a, ' --> ', $b, "<br />\n";} ?>
  16. change line $query = mysql_query("SELECT topics FROM users WHERE username='{$_SESSION['auth_user']}'"); to $query = "SELECT topics FROM users WHERE username='{$_SESSION['auth_user']}'";
  17. if you look source code of your page you can see that your server doesn't pharse php at all try to change short php tag '<?' to regular '<?php'
  18. remove " (double quote)from the start of the file
  19. try $decadecode = $fired * 100 + $divorced * 10 + $decadenumber;
  20. or <?php $a = file_get_contents('http://www.stickam.com/viewCategorySchedule.do?category=show/css/en/category/show/schedule.css'); preg_match_all('/buildScheduleDiv\(\'([^\']+)\'\)/', $a, $b); $out = array(); for ($i = 1; $i<count($b[1]); $i++){ $out[] = explode("','", $b[1][$i]); } print_r($out); ?>
  21. try <?php $a = file_get_contents('http://www.stickam.com/viewCategorySchedule.do?category=show/css/en/category/show/schedule.css'); preg_match_all('/buildScheduleDiv\(([^)]+)\)/', $a, $b); $out = array(); for ($i = 1; $i<count($b[1]); $i++){ $out[] = explode(',', str_replace("'",'', $b[1][$i])); } print_r($out); ?>
  22. try <?php $a = file_get_contents('http://www.stickam.com/viewCategorySchedule.do?category=show/css/en/category/show/schedule.css'); preg_match_all('/buildScheduleDiv\(([^)]+)\)/', $a, $b); print_r($b); ?>
  23. is it what you want <img src="novi.jpg" height="30" width="40" onclick="getElementById('big').src=this.src"> <img src="Sunset.jpg" height="30" width="40" onclick="getElementById('big').src=this.src"> <img src="" width="400" height="300" id="big"> <hr /> <div style="float:left;"><img src="novi.jpg" height="30" width="40" onmouseover="this.height=300;this.width=400" onmouseout="this.height=30;this.width=40"></div> <div style="float:left;"><img src="Sunset.jpg" height="30" width="40" onmouseover="this.height=300;this.width=400" onmouseout="this.height=30;this.width=40""></div>
×
×
  • 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.