Jump to content

ober

Staff Alumni
  • Posts

    5,327
  • Joined

  • Last visited

Everything posted by ober

  1. Once the script executes on server 2, can you do a header redirect back to server 1 with the variables in the URL?
  2. You will need to have access to the 404 handler provided by your server. Normally this is like 404.shtml or something similar. You will have to overwrite this file with whatever comments your users need to see. You should be able to catch the URL and then redirect or whatever you need to do.
  3. Here's an idea... you PM me with a reason why this isn't a spam mechanism and I'll re-open it and try to answer the question.
  4. I'm impressed with the header graphic work... some of the best I've seen on car sites. I'm also impressed with the integration with VBulletin... great work. But I definately agree... you need to move all that great info out of the forums and onto the main page. I don't know what would be the best "system" to use... are you just looking for a decent CMS? I suppose PostNuke would probably be a fair bet, but I've never used it. I'd think a home-grown version might do best for you, however.
  5. Looks like someone doesn't have PHP installed or working correctly. Clicking on the links tries to make me download "page1.php".
  6. Add single quotes around $sku.
  7. If you want to set a limit on the number to use before it goes to the next line, you'll have to include a counter and then close the <tr> and then reopen one. [code]<table> <? include "connect.php"; $result = mysql_query("SELECT * FROM affiliates ORDER BY id"); $rowcount = 0; while($row = mysql_fetch_row($result)) { if($rowcount == 0)      echo "<tr>"; // start row $id = $row[0]; $countout = $row[1]; $countin = $row[2]; $ws_name = $row[3]; $ws_link = $row[4]; $ws_button = $row[5]; ?> <td> <div align="center"><a href="afiliado.php?outid=<?php echo $id; ?>" target="_blank"> <img src="<?php echo $ws_button; ?>" width=88 height=31 alt="<?php echo $ws_name; ?>" border="0"></a> <br> <span class='style20 Estilo3'>Entraron:</span> <?php echo "<span class='style20 Estilo3'> $countin </span>";?> | <span class='style20 Estilo3'>Salieron:</span> <?php echo "<span class='style20 Estilo3'> $countout </span>";?></div> <td> if(++$rowcount == 3) // increment and compare to max row count {      echo "</tr>";  // close row     $rowcount = 0;  // reset counter } <? } if($rowcount < 3)    echo "</tr>";  // just to have valid code ?> </table>[/code] I hope that makes sense.
  8. It should look like this: [code]<?php $to = 'myemail@whatever.com'; $subject = 'Test'; $name = $_POST['StartMonth'] . $_POST['StartYear']; $message = $name; $headers = 'From: website@whatever.com' . "\r\n"; mail($to, $subject, $message, $headers); ?>[/code] POST must be in caps and you can't grab 2 variables at a time.
  9. You're setting a normal variable and echoing a session variable. Replace it with the following. [code]<?php echo $kt_login_user ?> <p>&nbsp;</p> <?php $sql = "SELECT 'welcome' FROM 'users' WHERE 'username' = '$kt_login_user'"; $qry = mysql_query($sql); if(@mysql_num_rows($qry) > 0) { $r = mysql_fetch_array($qry); $kt_welcome = $r['welcome']; } else { $kt_welcome = "My default text"; } ?> <textarea name="welcome" cols="80" rows="20"><?php echo $kt_welcome; ?></textarea> <?php mysql_close(); ?> [/code]
  10. Ok... a few more things I noticed. 1) You're setting this: $kt_welcome; You're echoing this: echo $_SESSION['kt_welcome']; Those are not the same. 2) You don't need a while loop: while($r = mysql_fetch_array($qry)) { $kt_welcome = $r['welcome']; } becomes: $r = mysql_fetch_array($qry); $kt_welcome = $r['welcome'];
  11. The first part you'll have to write yourself... but here's an example of a way to write out a CSV formatted file... some modifications will have to be made. This works with a MSSQL database and spits out the column names and then the data.[code]    $ehandle2 = new sql_handler(1, "", "queryoutput.php");     $exitcode = 0;     //echo "<br/>" . stripslashes($query) . "<br/>";     $result = $ehandle2->update_query(stripslashes($query));     if(!$result)         $exitcode++;              if($exitcode == 0)     {     //C:\Inetpub\wwwroot\Query\temp          $filelink = "./temp/qry" . date("HismdY") . ".txt";     $filename = "C:\\Inetpub\\wwwroot\\Query2\\temp\qry" . date("HismdY") . ".txt";          if (!$handle = fopen($filename, "wb"))     {         echo "Cannot open file " . $filename;         exit();     }          $printcolnames = 1;     while($row = mssql_fetch_array($result))     {         $rowval = "";         // ============ print column names ====================         if($printcolnames == 1)         {             $rowname = "";             for($i=0;$i<mssql_num_fields($result);$i++)                 $rowname .= mssql_field_name($result, $i) . "\t";             $rowname = substr($rowname,0,-1) . "\n";             if (!fwrite($handle, $rowname))             {                 echo "Cannot write to file $filename";                 exit;             }                 $printcolnames = 0;         }         // ========= end print column names ===================                  // ========= print col values ========================         for($i=0;$i<mssql_num_fields($result);$i++)             $rowval .= $row[$i] . "\t";                          $rowval = substr($rowval,0,-1) . "\n";                  if (!fwrite($handle, $rowval))         {             echo "Cannot write to file $filename";             exit;         }             // ========= end print col values ===================     }          fclose($handle);          echo "<br/><br/><p class=pheader2>Your results can be found here: *</p><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - <a href=\"" . $filelink . "\" target=\"_blank\">Tab Delimited Results File</a>&nbsp;&nbsp;&nbsp;<span class=chatter>(right-click -> \"Save Target As ...\" to save to local PC, then open with Excel)</span>";[/code]
  12. You actually need a semi-colon after the $headers line.
  13. You're not displaying any message ... it's probably sending the mail, but you don't have a success message or anything.
  14. What is the method of the form? GET or POST? The variables will be passed to the processing script as $_GET['name'] or $_POST['name']. GET passes them in the URL... POST passes them without showing them in the URL.
  15. Putting a div around a line of data will put each on a seperate line, creating a column. You can open the div before the loop and close it after the loop is done to center the data.
  16. I would also suggest putting quotes around $kt_login_user in this statement: SELECT 'welcome' FROM `users` WHERE `id` = '$kt_login_user' Failing those changes, I'd suggest verifying that the query is executing correctly and you have something other than the Default text in the database.
  17. I don't understand how chmodding would be an issue for you at all. You wouldn't have to do it manually... you can use PHP to chmod the files after they're uploaded. And I have to disagree with your statement that "the behavior of permissions is not stable".
  18. That's exactly right... just make the message contain the variables. Take a shot at it and let us know what you get. You may also want to set the return value of the mail function to a variable so you can test to see if it succeeded or not.
  19. Change: $r[1]; To: $r[0]; You're only selecting one field from the database and the fetch_array function starts the array at 0.
  20. Alright... a few issues: 1) you don't have to use session_register(). Just use $_SESSION['var_name'] = x; 2) }else if( ! $name|| $password) won't work. $name and $password are not boolean variables. And I assume you want to fail that if when $password is blank as well.... right now it passes if $password is true. And you never compare the database results to what is passed from the form. How do you think authentication works!?!?
  21. XP Home will work fine. You could try the tutorials here.
  22. I suggest you post this question over there. Your login here and there are the same.
  23. [a href=\"http://www.grisoft.com/doc/SmallAndMedium/lng/us/tpl/tpl01\" target=\"_blank\"]http://www.grisoft.com/doc/SmallAndMedium/lng/us/tpl/tpl01[/a] AVG is the way to go, IMO. I wouldn't trust McAfee any farther than I could throw them and Symantec has been ok here where I work, but I honestly feel like Grisoft makes a better product and will cost you less in the long run.
  24. You can download and install PHP and Apache on your computer to test your scripts and you can use a text editor or something like PHP Developer 2005 or 2006 to develop the code. But yes, you'll need a host that has PHP on it to run PHP scripts.
×
×
  • 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.