Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: seahorse123
  • Content: Threads
  • Order by date
  1. seahorse123

    how to get the full filename?

    I have file uploaded to the server by using move_uploaded_file(), the uploaded files have the different file type(extension name like jpg, gif, pdf...) Now I want to retrieve these files and have it linked from the webpage, I already have the file name, the problem is how the script knows the...
  2. seahorse123

    how to convert into array?

    If I have $v[]="1,2,3", how can I convert this into an array: $v[0]=1 $v[1]=2 $v[2]=3 thanks.
  3. seahorse123

    How to find if the value is inside array?

    In php file I have a value for example $a=40, and an array $a[]=[10,20,30,40] is there a function to find if this variable is one of the element of the array? thanks.
  4. seahorse123

    string replacement question.

    Any comments on the function: preg_replace(), reg_replace() and str_replace() what's the difference between them? which one is more often used?
  5. seahorse123

    is it possible to include php file with limited width and height?

    I tried to populate data from DB to textarea on the page(file1.php), however as it's impossible to make hyperlink and change color in textarea, so I want to retrieve data to another php file(file2.php) and include it into file1.php, the problem is how to set and restrict the width and height, to...
  6. seahorse123

    how to get max value?

    In the table, there is a column (col varchar 20). I have these values saved: 1_1 1_2 1_9 1_14 now I want to get the max value "1_14", if the column is INT type, I can easily use MAX(col), but it's the varchar type, if I use MAX(col), I will get "1_9", so how to get the max value in the varchar...
  7. seahorse123

    Is it possible to use INCLUDE to password parameters?

    If I want to display the included file's information based on passed value, is it possible to do that? for example: file1.php: <? $a=$_GET['p']; if ($a==1) { print "ABCD"; } elseif ($a==2) { print "XYZ"; } ?> file2.php: <? ... include "file1.php?p=1"; ... include "file1.php?p=2"; ... ?> so...
  8. seahorse123

    Cannot display entire field contents from DB.

    I have text contents that is saved in the table column "message varchar 5000" However when I tried to retrieve it, it only display the first 255 characters: $query="select message from tb1 where id=1"; $result=mssql_query($query); for ($i=0;$i < mssql_num_rows($result); ++$i) {...
  9. seahorse123

    simple question

    I have two tables: tb1, tb2 "tb1" contains fields: user, project, lastupdate "tb2" contains fields: user, profile, address "tb1": each user may have multiple projects, with different update time. Now I want to join this two tables to list all users with profile, address and the latest...
  10. seahorse123

    Question about character convert

    In the form textarea, I entered: "test" 'test' \test\ /test/ the script uses funtion "htmlentities(string,ENT_QUOTES)" to convert single/double quote and save it to Microsoft SQL server with the format: \&quot;test\&quot; \&#039;test\&#039; \\test\\ /test/ When I tried to retrieve it back with...
  11. seahorse123

    how to build add/remove multiple select form in php?

    I want to create two multiple select box, with four buttons(Add, Add All, Remove, Remove All) between them, user can select one or more item from one side, then click the button so it will be shown on the other side, how can I do that in php? any suggestion will be appreciated.
  12. seahorse123

    Question about SELECT statement.

    I have a table "tbl" which contains field "column1", and an array $v1 which contains strings "a1,a2,a3,a4", I want to populate all data from "tbl" that column1 matches "a1" or "a2" or "a3" or "a4", how to do that? do I have to split the array first and run this SELECT statement repeatly? SELECT...
  13. seahorse123

    how to populate certain range of records?

    Suppose I have 1000 records in MSSQL DB. how can I retrieve the records from 300 to 400, in Mysql I can say: select * from table limit 300, 100 but how to do that in MS SQL server? Thanks.
  14. seahorse123

    why the function &quot;htmlentities&quot; doesn't work?

    I found that the function "htmlentities" doesn't work on my server, for example I have the code: <?php $str = "A 'quote' is <b>bold</b>"; echo htmlentities($str, ENT_QUOTES); ?> it's supposed to display: A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt; but what I can see is: A 'quote' is...
  15. seahorse123

    how to display error message?

    I installed PHP5 on the server and works fine. The problem is if there is error in the php file, the browser just shows the blank page, instead of showing the error message, how can I enable this feature to display error message? Thanks in advance.
  16. seahorse123

    convert date format.

    I want to convert the string($date) from "Apr 5 2003 12:00AM" to "04/05/03", what function I should use, I tried: date('m/d/Y',$date); $date="Apr 5 2003 12:00AM" but it returns: 12/31/1969 anyone can help? thanks.
  17. seahorse123

    How to save image path to DB?

    How can I save the image path to DB table from a php form, using relative path instead of absolute path? if I create a file upload box, it lets me select image and upload to the server, but that's not I want, I only need a relative path saved to DB. Any help will be appreciated. mike
  18. seahorse123

    How to write the WHERE clause?

    I want to submit a form, which has multiple dropdown menu: dd1, dd2,dd3. these values will be passed to the process page to populate the data from DB, on the process page I have code: $v_dd1=$_request['dd1']; $v_dd2=$_request['dd2']; $v_dd3=$_request['dd3']; if(($v_dd1)<>'') {$clause =...
  19. seahorse123

    how to get substring?

    I have file names like: a11_001.htm b34_02.htm c8_003.htm Now I want to get the substring before character '_', it will show as: a11 b34 c8 how can I do that? thanks for any help.
  20. seahorse123

    Question about database selection

    Hi, I am in the process of deciding the database and application language. We have exising MS SQL server running on windows OS, to store data, right now I need to build another seperate system for intranet use, as I am more familiar with PHP+Mysql, I want to use php, now if I use PHP+MS SQL, is...

Part and Inventory Search

Back
Top