Jump to content

jvrothjr

Members
  • Posts

    299
  • Joined

  • Last visited

Everything posted by jvrothjr

  1. taking a guess at this one [code] if ($result == $hash) { [/code] needs to be [code] if ($newresult == $hash) { [/code]
  2. Nope not me have been surfing a lil and a friend found a 5.2 vers of php on some other forum that some one had compiled and he stated the had worked with apache 2.2.x. but was nope willing to running it on his production server till php it self released a vers that would work with Apache 2.2.x Seems the issue is php 5.1.x and apache 2.2.x.  On Windows OS. 
  3. running the latest ver on what OS my quess its the OS for you Windows XP seems to have some issues......
  4. [code] $query = "delete from End_review where topic_title = ".$title; mysql_query($query) or die(mysql_error()); [/code] you need to compair it to a field name.....
  5. running in to trouble with php 5.1.4 and apcahe 2.2.x Finding out that as long as I stay below 2.2.xx apache I have no troubles using php 5.1.2/mysql 5.0.22/apache 2.0.54 at this time for production work.....
  6. First a few question for you. 1) local drive letters?????  or are some of them network drives? 2) do you want the server side drive letters or the client side drive letters? 3) if network drive letters what and how are you running for your http server software????? Sry you asked a loaded quesstion... Because say if some of them are network drive letters and your runnig say Apache as a service Apache does not have the ability to use the network drive letters. because the service is loaded before the network there for Apache cant see them.......
  7. See this topic delieve your asking the same thing http://www.phpfreaks.com/forums/index.php/topic,96951.msg388556.html#msg388556
  8. $ID=$row['ID']; & $Name=$row['Name']; Needs to be within the loop to change the data. [CODE] <?php $result = mysql_query("SELECT * FROM client") or die(mysql_error());  echo '<form name="form1" method="post" action="">'; echo '<select name="select">'; //make some short variables while($row = mysql_fetch_array( $result )) { $ID=$row['ID'];//suppy the correct field names below $Name=$row['Name']; echo '<option value="' . $ID . '">' . $Name . '</option>'; } echo "</select>"; echo "</form>"; ?> [/CODE]
  9. [code]$query = mysql_query("SELECT * FROM `user` WHERE `active` = '1'");[/code] This will get you the order the data was pulled from the table
  10. Fire Wall software on the PC/Server that is running MSSQL
  11. I have a form setup close to the idea your looking for But I have the form biuld as the chooses are made. Mine build Inventory Part numbers as chooses are made options for the last choose are displayed. They have to select the type of "Property" they wish and based on that what is displayed next. for example I would have a if statement if ($prop <> "Bungalow") {Display Select Number of floors} else {}
  12. I would use for pricing and check to yes what the field type is.... [code]Opt1 between '$_POST[minprice]' and '$_POST[maximumprice]'";[/code]
  13. Banning some one based on IP is not the best there is no true way to stop anyone from getting back in based on IP. For me I have cable modem connection and all i have to do to reset my IP is shut it down and restart it and I will get a new IP. Plus the user can just go to another location and get back in...... you maybe able to Ban by Mac ID on the network card.  but this will lock that card out.
  14. That works ok if all user email are only 4 char long try this have not tested the code but this would be the general layout [code] $strcnt = strlen($email); for ($i=0; $i <= $strcnt; $i++) { $chkchar = (substr($email,$i,1)) if ($chkchar = "@") {$i = $strcnt;} else {$username = $username + $chkchar;} } [/code]
  15. Well do you use sessions you could set the sessions id in the cookie and when the session id changes display back again this way if they refresh the Id dont change...........
  16. maybe its a function on your alotted time to complete the code. Both functions work alone but not together. increase your alotted time to complete task.... line 97 really dont help its a call function that call mail and passes variables.
  17. My guess on this one would be an array [code] $max = 5; For ($i=1; $i <= $max; $i++) { if ($item[$i] == '1') { echo "<input type='checkbox' name='item' value='".$item[$i]."' checked>".$i; } else { echo "<input type='checkbox' name='item' value='".$item[$i]."'>".$i; } } [/code] $max being the max number of Options this sample I am using 5 as the max $item[] array would hold the value for the field example 0,1,1,1,0 in this array it would not create the array as you have stated 1,2,4 this style would create that string as 1,1,0,1,0 1 meaning checked 0 meaning unchecked and within your loop you would see whether its checked or unchecked and very record entered in the DB would hold the same 5 values in this field but it would be 0 or 1 and not the number to display checked.
  18. [code]         mysql_select_db ("menu");         $result = mysql_query ("select * from linktable");         if ($row=mysql_fetch_array($result)) { //This is one way pull the whole string from a field             echo "<a href = '/".$row['Link']."' TARGET='main'></p>"; //This is a second way by just adding the value to the Fixed URL             echo "<a href = 'EditPage.php?id=".$id."' TARGET='main'></p>";                        $row=mysql_fetch_array($result);         } [/code]
  19. [!--quoteo(post=388557:date=Jun 27 2006, 01:08 PM:name=localhost)--][div class=\'quotetop\']QUOTE(localhost @ Jun 27 2006, 01:08 PM) [snapback]388557[/snapback][/div][div class=\'quotemain\'][!--quotec--] [code]$query = "INSERT INTO `content` ( `id` , `parentid` , `order` , `text` , `date` , `alttext` , `icon` , `type` , `status` , `permission` , `poster` , `mod` , `count1` , `count2` ) VALUES ('0', '-1', '1', 'Powered by dotOmega', '0000-00-00', '', '', '0', '0', '1', '0', '0', '0', '0');"; $result = mysql_query($query) or die('Query failed: ' . mysql_error() . '<hr><b>Error: E004</b>'); $query = "INSERT INTO `content` (`id`, `parentid`, `order`, `text`, `date`, `alttext`, `icon`, `type`, `status`, `permission`, `poster`, `mod`, `count1`, `count2`) VALUES ('1', '0', '1', 'Your dotOmega Forum', '$date', 'Thank you for installing dotOmega Forum System, you may edit this forum to your liking.', '', '2', '0', '1', '','', '', '')"; $result = mysql_query($query) or die(mysql_error());[/code] thats the code and heres the error: Duplicate entry '1' for key 1 [/quote] DB structure is one of your fields primary Key (maybe ID) and 1 is already definded and there are no dup's definded for the field..... I would check your DB structure on this one
  20. I had to do what your asking with multi Keyword search any place say the keyword was used across multi field in one table. Its not a function of how the DB was designed its a function of how the user wishes to find something...... Say the user wishes to find every place a product name was used in say a test request DB. [code] $querystring = "select * from tbldata where Test_Description like '%$Keywords[0]%' or TestName like '%$Keywords[0]%' or Reason like '%$Keywords[0]%' or Comments like '%$Keywords[0]%' or Product like '%$Keywords[0]%'"; [/code] I have shorted this query for you (above) I have it search for multi keywords with in the same record(below). Say here failed%product are used together. The program splits the keyword at % and searchs for both with in each record. [code] $querystring = "select * from tbldata where Test_Description like '%$Keywords[0]%' and Test_Description like '%$Keywords[1]%' or TestName like '%$Keywords[0]%' and TestName like '%$Keywords[0]%' or Reason like '%$Keywords[0]%' and Reason like '%$Keywords[0]%' or Comments like '%$Keywords[0]%' and Comments like '%$Keywords[0]%' or Product like '%$Keywords[0]%' and Product like '%$Keywords[0]%'"; [/code] I use MS Access to layout SQL queries and what your asking I could to get it to do. I had to list each field I wished to Search and how I wished to search them I could not get it to mass search the table for a keyword with out listing every field name.....
  21. [code] $body.="Shipper:    ";         "<input type=radio name=Shipper value='Sea'>Sea";         "<input type=radio name=Shipper value='Air'>Air\n"; $body.="Consignee:    ".$Consignee."\n"; $body.="Port of Loading:    ";         "<input type=radio name=PortofLoading value='Port'>Post";         "<input type=radio name=PortofLoading value='Door'>Door\n"; $body.="Port of Discharge:    ";         "<input type=radio name=PortofDischarge value='Port'>Port";         "<input type=radio name=PortofDischarge value='Door'>Door\n"; $body.="Place of Delivery:    ".$PlaceofDelivery."\n"; [/code]
  22. [code] echo "<TD><a href=update.php?"ID=".$id." target='_blank'>".$id."</a></TD>"; [/code] use a variable to place the value if the correct places in the line $id being the value you wish to pass to the update page.......
  23. [!--quoteo(post=386967:date=Jun 22 2006, 04:27 PM:name=VTS)--][div class=\'quotetop\']QUOTE(VTS @ Jun 22 2006, 04:27 PM) [snapback]386967[/snapback][/div][div class=\'quotemain\'][!--quotec--] Thanks for the info and yes, I am using apache. So I guess this means that I have to use the javascript then. Anyone know how to imbed that into my php? [/quote] I use a round about way with FTP running on a logged in user. I just create a FTP User ID that was rights to that mapped network drive and copy the files via FTP to get to that network drive. In my case I only have three subfolder so I have three Id's......... This was my workaround but the machine that runs the FTP server has to be logged in and not started as a serve but started as a program after login....
  24. [code] $sql = "INSERT INTO matches ( 'opp' , 'time' , 'result' , 'ip' , 'username' ) VALUES ( '$opp' , '$time' , '$result' , '$ip' , '$username' )"; [/code] its the quotes most of the time. I run into is all the time use phpadmin and to run sql querys have remove most of the qoutes it puts in
  25. [!--quoteo(post=386952:date=Jun 22 2006, 04:08 PM:name=VTS)--][div class=\'quotetop\']QUOTE(VTS @ Jun 22 2006, 04:08 PM) [snapback]386952[/snapback][/div][div class=\'quotemain\'][!--quotec--] I have been trying to copy a file using php but for some reason, I cannot copy a file from a drive on the network to my c drive using the copy function. I can copy files from one place on my c: to another place on my c: but as soon as I try to copy a file from a network drive it tells me the file does not exist. The only thing I could think to do was to find a workaround for this by using javascript to copy the file to my c: so I can use it. The problem I have is that I dont know how to imbed javascript into my php. If anyone could give me some ideas on how to fix the problem with not being able to copy from a network drive or how to imbed javascript into my php I would greatly appreciate it. [/quote] if you are using apache/php apache dont like to work with mapped drives basiclly because apache starts as a server before mappings are set...... there for does not see the mappings.
×
×
  • 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.