Jump to content

PHPTOM

Members
  • Posts

    84
  • Joined

  • Last visited

About PHPTOM

  • Birthday 02/17/1994

Contact Methods

  • MSN
    scimu@bobblefm.co.uk

Profile Information

  • Gender
    Male
  • Location
    UK

PHPTOM's Achievements

Member

Member (2/5)

0

Reputation

  1. When you mysql_connect did you give it the variable of $con? Or as long as it isn't a persistant connection you could just remove that line.
  2. Hello, I haven't ran your code. However, I quickly saw that you have used single equals sign in your if statement: if(($user_type = "user") && ($is_verified = "1")) { What you should do is use double equals to create an 'is equal to' condition. For example: if($user_type == 'user' && $is_verified == 1) {
  3. Hey, Looking to find a solution to something. I have been experimenting making a template engine for a website I am building. How can I search a variable for all occurrences of {VARIABLE} eg. {Username} {Title} {Content} so I can str_replace them. Thank you
  4. What are your motives for doing this? I don't get what you are trying to achieve by using output buffering. If you want to display the code just put: <html> <body> <center> <br/> <h1>Apartment Reference #: <?php echo $_POST["reference"]; ?><br /></h1> <br/> <?php echo $_POST["application"]; ?>, <?php echo $_POST["deposit"]; ?><br /> <?php echo $_POST["pets"]; ?><br /> <br/> <?php echo $_POST["community"]; ?><br /> <?php echo $_POST["interior"]; ?><br /> <?php echo $_POST["amenities"]; ?><br /> <br/> <?php echo $_POST["contact"]; ?><br /> <a href="<?php echo $_POST['website'] ?>"><?php echo $_POST['website'];?></a><br/> <br/> <br/> <br/> </body> </html> into a blank php file and it will display
  5. <?php ob_start(); ?> <html> <body> <center> <br/> <h1>Apartment Reference #: <?php echo $_POST["reference"]; ?><br /></h1> <br/> <?php echo $_POST["application"]; ?>, <?php echo $_POST["deposit"]; ?><br /> <?php echo $_POST["pets"]; ?><br /> <br/> <?php echo $_POST["community"]; ?><br /> <?php echo $_POST["interior"]; ?><br /> <?php echo $_POST["amenities"]; ?><br /> <br/> <?php echo $_POST["contact"]; ?><br /> <a href="<?php echo $_POST['website'] ?>"><?php echo $_POST['website'];?></a><br/> <br/> <br/> <br/> </body> <?PHP $HtmlCode= ob_get_contents(); ob_end_flush(); ?>
  6. Couple of ideas: Use AJAX to submit the form to include both of them in a get statement Or: As the value put something like value="1&delete" Then you can explode it to form an array Eg: <input name="delete[]" type="checkbox" value="1&delete" /> $array = explode("&", $val); echo $array[0]; //Value echo array[1]; //ID Hope you get the jist
  7. Id is not passed to PHP. It is used client side in JS/CSS.
  8. It will most probably be the server's host name that has been blocked and not the IP
  9. This might not be down to you personally, but the server been blacklisted. Are you on free shared hosting by any chance?
  10. <?PHP function validFileName($text, $extension = 'jpg'){ return ereg_replace("[^A-Za-z0-9\-]", "", str_replace(' ', '-', strtolower(trim($text)))).'.'.$extension; } echo validFileName("CrazyDave's Upload!"); ?>
  11. Well, presuming you are using Apache and virtual hosts for the different websites on your server.. you could just change the ini for your virtual host?
  12. I've thought of that, the problem though is that files can be up to 5GB in size. If I change the php.ini to allow such big files I think all other (internet) 'friends' may abuse it, that's why I started the home server. Well protect the page with some kind of username/password? Even htaccess would suffice if it is a small time thing.
  13. Security reasons. To the other server you could be a malicious hacker. Best way IMO is to do all the logic on server 1 as to whether to upload or not, then use PHP's FTP functions to upload it to server 2.
  14. Please give us the full picture, because so far you have only gave us bits.
×
×
  • 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.