Jump to content

TheWebExpert

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by TheWebExpert

  1. if ($_POST['select_button_x'] > 0) { echo "select"; } if ($_POST['activate_button_x'] > 0) { echo "activate"; } This got the job done.
  2. That's because I intentionally cut the line off for the forum. It's the first part (the name/value) of the buttons I was posting. The $_POST just isn't getting the information.
  3. I really need this particular form to have two separate submit buttons. I have a listbox, on which I've selected the item in question. With button1, I want to simply "check" or "uncheck" a box, and then redisplay the list. With the other, I want to do other editing. However, no matter how I do it (either same name, different values) or (different name, different values), I'm not seeing the buttons at all. <form action = "processedit.php" method = "post" style = "z-index: 1; width: 898px; height: 232px; position: absolute; top: 30px; left: -1px"> <input type = "image" name = "sbutton" alt = "Submit" value = "Select" id = "zz" ... <input type = "image" name = "abutton" alt = "Submit" value = "Activate" id = "qq" ... <input type = 'hidden' name = 'uname' id = 'uname' value = '<? echo $uname; ?>'/> <select name = "books" class = "auto-style1" value = '' size = "40" style = "width: 543px; height: 203px; z-index: 1; position: absolute; top: 11px; left: 15px"> ... if (isset($_POST['abutton'])) $func = $_POST['abutton']; if (isset($_POST['sbutton'])) $func = $_POST['sbutton'];
  4. Well, it seemed as if that was done - but it just wasn't working. It's too big of a headache. I'm just going to set up two independent websites, and be done with it.
  5. AFAIK, what I'm trying to do IS possible - I'm just not sure what's wrong. My company has multiple hosting plans. The basic plan is one website. I can have multiple domains, but only one hosted site. I can do DNS forwarding on the 2nd domain, or an alias on the 2nd domain. If I pay extra, I can get the deluxe hosting - which can have as many websites hosted on the server as I care to dream up. What I wanted to have happen was to have my singleton website try to determine what it was the person had typed. If they typed www.mullins-storage.com, then - instead of bringing up the index.php for www.br-storage.com, it would bring up a slightly different index.php geared toward www.mullins-storage.com instead. If you're telling me that this isn't possible, then I'll have to bite the bullet and pay for the deluxe hosting, and have two individual websites.
  6. Uh. AFAIK, I need a separate hosting for multiple sites. Basic can only do one; I have multiple domains, but only one hosting... and therefore one website. If you can clue me into how I'd do multiple websites, I'd appreciate it.
  7. How is that possible? Each server can only serve ONE website. Mullins is on the same server, but can't have its own website. Therefore, there HAS to be some sort of redirect or alias or whatever, so that, with the proper code, I can detect what people were searching for - and thus make it LOOK like there are two separate websites, when, in fact there's only one.
  8. I thought that redirecting (or alias, or whatever) was the right way. If it's not an alias or redirecting, there won't be anywhere for it to go. The br-storage site goes to the br-storage site; the mullins-storage ALSO goes to the br-storage site. Isn't that what you said? That both domains should go to the same site? I'm confused. Can you explain exactly what you mean?
  9. All right, they changed it to an alias. However, the code simply times out.
  10. I am forwarding the DNS of www.mullins-storage.com to www.br-storage.com.
  11. I can't afford the deluxe hosting. With the deluxe hosting, I can have an infinite number of websites under one hosting plan. With the basic hosting, I can only have one site hosted. So, what I have is the DNS pointing the second domain to the first; if the user types "www.sam.com," they still go to "www.bob.com," but they see the content for "www.sam.com" instead, just as if it was its own site.
  12. Ok, so let's say my website is bob.com - fine. Well, I want to have sam.com also, but can't afford to pay for Deluxe hosting. So I get the domain, but I forward sam's DNS servers to point at Bob, with masking on. What I'm looking to do is to identify what the person typed in - i.e., the original, unmodified URL. Here's what I have currently: function get_redirect_target($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $headers = curl_exec($ch); curl_close($ch); // Check if there's a Location: header (redirect) if (preg_match('/^Location: (.+)$/im', $headers, $matches)) return trim($matches[1]); // If not, there was no redirect so return the original URL // (Alternatively change this to return false) return $url; } $path = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; echo get_redirect_target($path); The main problem here is that it's VERY slow. I'm also often getting a 500 error. Anyone have any ideas?
×
×
  • 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.