Jump to content

wdo_will

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wdo_will's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am having the weirdest problem that I can't seem to figure out.  Basically, my web host thinks it is always serving up requests to post 81, not 80, although I am always accessing it via port 80, of course.  Whenever I install a script (e.g. WordPress), it also thinks it is installing to port 81.  I tried doing a phpinfo(); and in the Apache HTTP_HOST section it says port 80, also.  This wouldn't be a problem, because I just go into WordPress's database with phpMyAdmin and change it, but it is messing up redirects via mod_rewrite and .htaccess for WordPress.  I set it up to use the nicer URIs in WordPress, and it writes to .htaccess, but just redirects to my homepage every time I try it out.  Has anyone every had this problem before, and if so, is it possible to fix via .htaccess (I don't have access to http.conf or php.ini)?
  2. It is possible with any other array, so I'm sure it will work here. The problem is that variables are only read within double quotes ("$var").  So, if you make $var = 'hi', and say echo '$var'; it will not work.  But if you say echo "$var"; or echo $var; it will work. So, basicly, there are three ways to do this. [code]<?php //start loop if (isset($_POST['checkboxName_'.$variable])) { //add checkbox to database } //end loop ?[/code] This will make the variable out of the $_POST array have two strings, ie 'checkboxName_' and then $variable (hope that makes sense  :-\) [code]<?php //start loop if (isset($_POST["checkboxName_$variable"])) { //add checkbox to database } //end loop ?[/code] This does the same as your example, but actually reads the variable. [code]<?php //start loop $var = "checkboxName_$variable"; if (isset($_POST[$var])) { //add checkbox to database } //end loop ?[/code] This puts the entire sting that you want to grab out of the $_POST array into a variable. I hope you can understand this post, I can't think of how to explain everything properly!
×
×
  • 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.