Jump to content

andre3

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

andre3's Achievements

Member

Member (2/5)

0

Reputation

  1. i understand, so practically there isnt any way with php to grab the real ip address at one shot?
  2. so what are you implying ? i do not understand
  3. I did a little modification to your code its not the best lol an havent test it, but it suppose to work fine, just add other input fields an the mail() function <form method="post" form action="<?php echo $_SERVER['PHP_SELF']; ?>?submit=true"> <p class="formdesign"> <label for="name"></label> </p> <p class="formdesign"> <label for="email"></label> </p> <p class="formdesign">How many pages do you estimate your site will need? </p> <p> <span class="formdesign"> <label> <input type="checkbox" name="one" value="375" id="one"> Up to 5 pages</label> <br> <label> <input type="checkbox" name="two" value="575" id="two"> Up to 10 Pages</label> <br> <label> <input type="checkbox" name="three" value="775" id="three"> Up to 15 Pages</label> <br> </span></p> <p class="formdesign">Will you be selling items on your Website?</p> <p> <span class="formdesign"> <input type="checkbox" name="four" value="250" /> Yes <input type="checkbox" name="five" value="0"/> No</span></p> <p class="formdesign">Would like to be able to update the site yourself?</p> <p class="footnote">*If you will be selling items skip this step, as all e-commerce sites include a content management system.</p> <p> <span class="formdesign"> <input type="checkbox" name="six" value="150" /> Yes <input type="checkbox" name="seven" value="0"/> No</span></p> <p class="formdesign">Will your site need any of the following?</p> <p> <span class="formdesign"> <label> <input type="checkbox" name="eight" value="25" id="eight" > Audio/Video Player</label> <br> <label> <label> <input type="checkbox" name="nine" value="50" id="nine"> Flash Intro</label> <br> <label> <input type="checkbox" name="ten" value="25" id="ten"> Photo Gallery/Slideshow</label> <br> </span></p> <p><span class="formdesign"> Will you need any of the following? <label> <br> <br> <input type="checkbox" name="eleven" value="50" id="eleven"> Logo/Graphic Design</label> <br> <label> <input type="checkbox" name="twelve" value="50" id="twelve"> Copy (Words)</label> <br> <label> <input type="checkbox" name="thirteen" value="25" id="thirteen"> Images</label> </span><br> </p> <input type="submit" name="submit" value="Price" > </p> </form> </div> <map name="newdesignMap" id="newdesignmap"> <area shape="rect" coords="271,94,335,128" href="work.html" alt="work"/> <area shape="rect" coords="357,93,442,130" href="pricing.html" alt="pricing"/> <area shape="rect" coords="465,90,523,133" href="faq.html" alt="faq"/> <area shape="rect" coords="540,92,637,132" href="designer.html" alt="designer"/> <area shape="rect" coords="652,93,747,134" href="contact.html" alt="contact"/> <area shape="rect" coords="761,95,966,134" href="word.html" alt="word"/> <area shape="rect" coords="715,31,976,71" href="mailto:designer@designs.com" alt="email"/> <area shape="rect" coords="305,708,349,721" href="work.html" alt="work"/> <area shape="rect" coords="360,708,413,726" href="pricing.html" alt="pricing"/> <area shape="rect" coords="424,711,458,722" href="faq.html" alt="faq"/> <area shape="rect" coords="471,708,529,725" href="designer.html" alt="designer"/> <area shape="rect" coords="541,709,599,723" href="contact.html" alt="contact"/> <area shape="rect" coords="608,708,685,723" href="#" alt="sitemap"/> </map> </div> <div class="text" id="result"> <?php $submit = $_POST['submit']; $logos = $_POST['logos']; $pages = $_POST['pages']; $contactinfo = $_POST['contactinfo']; $submit2 = $_POST['submit2']; /// this execute the email form after the person fill out the form with his/her info if(isset($submit2)) { session_start(); header("Location: http://designs.com"); $to = "postmaster@mobilespot.ws"; $message = "Contact info : $contactinfo\n"; $message = "Pages:\t$pages\n"; $message .= "Logo:\t$logos\n"; } if(isset($submit)) { $total = ($_POST['one'] + $_POST['two'] + $_POST['three'] + $_POST['four'] + $_POST['five'] + $_POST['six'] + $_POST['seven'] + $_POST['eight']+ $_POST['nine'] + $_POST['ten']+ $_POST['eleven'] + $_POST['twelve']+ $_POST['thirteen']); echo " Your Price is \$ " .number_format ($total, 2, '.', ','). "<BR>"; echo '<a href="http://designs.com/projectrequest">Your Project Started </a>'; echo "<form action='' method='post'>"; echo "Your Contact<br/><input type='text' name='contactinfo'><br/>"; echo "<input type='hidden' value='$_POST[one]' name='pages'>"; /// Captures the pages value from the calculator echo "<input type='hidden' value='$_POST[two]' name='logos'>"; /// Captures the logos value from the calculator echo "<input type='submit' name='submit2' value='Send'>"; echo "</form>"; } ?> </div> </body> </html>
  4. Hey guys, when i use this to return someones ip: $_SERVER['REMOTE_ADDR']; it returns the server ip address, an it happends because www is handled as a forward on my server , however i use this function to get the persons real ip address: public function original_ip() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet { $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } but when i capture the ip address in a sql table, some of them are like this: 195.189.142.252 , 10.22.333.33 that i want to know is, which is the persons real ip address ? i did a explode on it, to get one ip address instead of 2, an it worked farely well.. although ive done that the mystery questions remains, 'which is the real ip' i would really appreciate some help. Thanks
  5. i figured it out guys, if the preg match didnt find a pattern i should have returned the string
  6. this is what i use: and it still not working accurate, if i put the content in a variable an pass it through preg match to get the value in between ='class1' , example: $val = "the class i want to use is <my class='class1'>"; $result = preg_match_all('%<div[^>]*[\s]class=[\'"]([^\'"]*)[\'"][^>]*>%i', $val, $matches); $result = $matches[1][0]; echo "<div class='$result'>"; if will work like that, but if i remove this: <my class='class1'> from the string then preg match wont return 'the class i want to use is' and if i add any other tags for example: <br/> etc to the string it wont pass them.
  7. Hey guys i want to know if its possible to get the index that's in: id <div class="center" id="index"/> so if i echo $id; it would print out: index i tried using pregmatch all, but it cuts out ever html tag from the page lol thanks!
  8. i got it man lol have a look: <a href='#' id='andre3' onclick='showCustomer(this.id)'>text</a> <a href='#' id='NORTS' onclick='showCustomer(this.id)'>text</a> <a href='#' id='WOLZA' onclick='showCustomer(this.id)'>text</a>
  9. Hi guys i am not too familiar with java script, but i am doing a project and i got this code from online its a drop down select form, so am wondering if its possible for me to make it 4 links instead of drop down, and when u click the link it passed the same value that the drop down menu would pass: thannks <select name="customers" onchange="showCustomer(this.value)"> <option value="andre3">Alfreds Futterkiste</option> <option value="NORTS ">North/South</option> <option value="WOLZA">Wolski Zajazd</option> </select>
  10. i think i am getting somewher now, one question, is there a way that i can change the id value thats into the bracked it a variable? reason is that when i run the script its updating all id numbrs uniquely but it updates them with the last id number example, if the last id number is 100 it adds that number to ever other id when the script runs, an i just need it to add a extra 1 to each id number each time. example; ($originalposition + 1) mysql_query("UPDATE site_pages SET id = (id + 1)"); ?
  11. still doesnt work accurate an am still trying, any other suggestions?
  12. here is it: $sql = mysql_query("SELECT * FROM site_pages"); while($row = mysql_fetch_array($sql)) { $newid = $row[id] + 1; mysql_query("UPDATE site_pages SET id='".$newid."'"); }
  13. Hi guys, whats the easiest way to update many different rows inside a table with one query, for example; i have a table called site_pages with id, name, position and there are 4 rows in there with is 1, 2 , 3 , 4, and i need to update all row id + 1.. how wud i do that? i tried using a while loop with a update statement inside it, but it update all the rows with the same number.... :-\
  14. Hi guys, i am doing a news letter on my site.. where i send music news to alot of people via email, but recently i notice that when i use the phpmail function not all users recieve the mails, can someone tell me a code that i cn use to send out alot of news letter emails? thanks
×
×
  • 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.