Jump to content

jakebur01

Members
  • Posts

    885
  • Joined

  • Last visited

Everything posted by jakebur01

  1. well can I include a php page on an .aspx page?
  2. Is their any way to run php on an .aspx page?
  3. Can I make a connection to one mysql account and pull several rows then make a connection to another mysql account and insert those rows?
  4. like this? <?php session_start(); $test= $_SESSION['SERVER_NAME']; echo $test; ?>
  5. is their any way to find out "localhost" of mysql to get the actual address? If not, is their any way to pull the content of a table off of localhost and connect to mysql on another server and insert the data into a table there?
  6. what is the maximum you would want to set your max_execution_time or memory_limit?
  7. i am getting this error: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 40 bytes) in \db_fns.php on line 15 here is that section of the code: function db_result_to_array($result) { $res_array = array(); for ($count=0; $row = $result->fetch_assoc(); $count++) $res_array[$count] = $row; return $res_array; } If it didn't count it would it fix my problem? How could I fix this?
  8. ok thanks.
  9. I just installed apache, php, and mysql. I ran a little test php script with mysql_connect() or die(); I am getting this error: Fatal error: Call to undefined function mysql_connect() in /var/www/index.php on line 11 Is this a php problem or a mysql problem? Is their something I need to set in my php.ini file in order to be able to connect?
  10. i installed ubuntu 7.04 server edition.... installed gui.... and then installed Webmin 1.360.. I am able to see a test html page under my root folder when I type my domain into the url. var/www/ = is the root directory where i put the test.html page My problem is that when I put a php page into that directory... it ask me to download that page rather than it parsing the php. ___________________________ in webmin i went to > PHP Configuration> and put this /etc/php5/cli/php.ini | configuration for mod_php /etc/php5/cli/php.ini | configuration for scripts run via CGI /etc/php5/cli/php.ini | configuration for command-line scripts _________________ I dont know if that was right_________ Is their somewhere in the php.ini where i need to put var/www/ as the root directory? How do I know whether php is even running? Thanks, Jake
  11. PHP Fatal error: Maximum execution time of 15 seconds exceeded I have a table with about 40 or 50 thousand items. I was trying to speed it up as much as I can.
  12. Is their any way to speed this up? <?php $db = mysql_connect("localhost", "1", "1"); mysql_select_db("1", $db); $result = mysql_query("SELECT isbn, description, title, author FROM books "); // WHERE catid <> 'TBP' while($myrow = mysql_fetch_array($result)) { $catid = $myrow['isbn']; $title = $myrow['isbn'].' '.$myrow['description'].' '.$myrow['title'].' '.$myrow['author']; $url = "show_book.php?isbn=$catid"; //echo "<small>"; //echo $myrow['isbn'].' '.$myrow['description'].' '.$myrow['title'].' '.$myrow['author']; ?> <a href="<?php echo $url; ?>"><?php echo $title; ?></a><br /> <?php } ?>
  13. i have a table with a lot of extra columns that I don't use. If i delete those extra columns will it allow php to run faster?
  14. If I have something that I need to pass through the url what would be the best way to encrypt it?
  15. Do you have any code to show me an example? what to put on page a > link to page b what to put on page b (this is also a ssl page) I just need my session from page a here on page b
  16. I don't want to store this in a database. I want to go through a cookie.
  17. could you serialize it and pass it through the url then get it on the https page?
  18. has anyone ever done this?>
  19. Could someone please walk me through passing a session from http on one domain to https on another?\ thanks, jake
  20. anybody? I know what I want to do, I just don't know how to do it.
  21. // use this if SSL is set up $path = $_SERVER['PHP_SELF']; $server = $_SERVER['SERVER_NAME']; $path = str_replace('show_cart.php', '', $path); display_button('https://'.$server.$path.'checkout.php', 'go-to-checkout', 'Go To Checkout'); How would I implement this if the address I want to go to is : https://mysite.com/myfolder/myname/checkout.php
  22. i couldn't get it to work. Here is my cart page under http://mysite.com/show_cart.php <?php include ('book_sc_fns.php'); // The shopping cart needs sessions, so start one session_start(); @ $new = $_GET['new']; if($new) { //new item selected if(!isset($_SESSION['cart'])) { $_SESSION['cart'] = array(); $_SESSION['items'] = 0; $_SESSION['total_price'] ='0.00'; } if(isset($_SESSION['cart'][$new])) $_SESSION['cart'][$new]++; else $_SESSION['cart'][$new] = 1; $_SESSION['total_price'] = calculate_price($_SESSION['cart']); $_SESSION['items'] = calculate_items($_SESSION['cart']); } if(isset($_POST['save'])) { foreach ($_SESSION['cart'] as $isbn => $qty) { if($_POST[$isbn]=='0') unset($_SESSION['cart'][$isbn]); else $_SESSION['cart'][$isbn] = $_POST[$isbn]; } $_SESSION['total_price'] = calculate_price($_SESSION['cart']); $_SESSION['items'] = calculate_items($_SESSION['cart']); } do_html_header('Your shopping cart'); echo "<center><img src=\"images/checkout1.gif\" alt=checkout /></center>"; if($_SESSION['cart']&&array_count_values($_SESSION['cart'])) display_cart($_SESSION['cart']); else { echo '<p>There are no items in your cart</p>'; echo '<hr />'; } $target = 'index.php'; // if we have just added an item to the cart, continue shopping in that category if($new) { $details = get_book_details($new); if($details['catid']) $target = 'show_cat.php?catid='.$details['catid']; } display_button($target, 'continue-shopping', 'Continue Shopping'); // use this if SSL is set up // $path = $_SERVER['PHP_SELF']; // $server = $_SERVER['SERVER_NAME']; // $path = str_replace('show_cart.php', '', $path); // display_button('https://'.$server.$path.'checkout.php', // 'go-to-checkout', 'Go To Checkout'); // if no SSL use below code display_button('https://www.myhostsite.com/folder/myfolder/checkout.php', 'go-to-checkout', 'Go To Checkout'); echo "<img src=\"images/checkout_credit_cards.gif\" alt=checkout />"; do_html_footer(); ?> and here is the https://www.myhostsite.com/folder/myfolder/checkout.php <?php //include our function set include ('book_sc_fns.php'); // The shopping cart needs sessions, so start one session_start(); do_html_header('Checkout'); echo "<center><img src=\"http://mysite.com/images/checkout2.gif\" alt=checkout /></center>"; ?> <style type="text/css"> <!-- .style12 {font-family: Georgia, "Times New Roman", Times, serif; font-weight: bold; } --> </style> <!--<table border="1" align="center" bgcolor="#FFFFFF"> <tr> <td><p align="center" class="style12">Shipping is available only in the 48 contiguous United States. </p></td> </tr> </table>!--> <div align="center"></div> <div align="center"><?php if($_SESSION['cart']&&array_count_values($_SESSION['cart'])) { display_cart($_SESSION['cart'], false, 0); display_checkout_form(); } else echo '<p>There are no items in your cart</p>'; display_button('http://mysite.com/show_cart.php', 'continue-shopping', 'Continue Shopping'); do_html_footer(); ?> </div> <?php echo "<img src=\"http://mysite.com/images/checkout_credit_cards.gif\" alt=checkout />"; ?>
  23. I don't understand. What do I need to do now?
  24. i am trying to implement ssl into my site. My ssl is setup under a different directory on the server (my host set up) So, i moved my three checkout pages and all of their include files to the new directory. I also changed all the links on the include files to the full path of my regular site for images ect. When i changed the link on the view cart page to the https:// address ..... it loses its session? When i leave the normal directory that the site is under and go to the https:// directory I have it will not pull up the $_SESSION['cart'] from the original directory. Any ideas?
  25. i am getting this error: PHP Parse error: syntax error, unexpected T_STRING $title = '<img src=\'images/'.($row['isbn']).'.jpg\' border=0 alt=$book['title'] />'; How should I have the alt=$book['title'] ?
×
×
  • 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.