Jump to content

r-it

Members
  • Posts

    231
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

r-it's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. the best would be to just create a file, build an html string with php and store that in the file you have created, ms word will automatically make the html readable (remember when creating the file you must name it with a .doc extension)
  2. this is an html query, not php, anyway why dont you try: <tr><td>1</td><td>|</td><td>2</td><td>|</td><td>3</td><td>|</td><td>4</td><td>|</td></tr>
  3. firstly, use include_once as opposed to include if (!empty($_GET['area'])) { $data[0]['area'] = $_GET['get_area']; } else { $data[0]['area'] = ''; } should be if (!empty($_GET['get_area'])) { $data[0]['area'] = $_GET['get_area']; } else { $data[0]['area'] = ''; }
  4. dude, you're doing the mail wrong check this link: http://php.net/manual/en/function.mail.php mail($email,$Firstname,$Lastname,$Issue,$Category) should be: $msg = $Firstname.'\n'.$Lastname.'\n'.$Issue.'\n'.$Category; $subj = "Posted data"; mail($email, $subj, $msg) that should work
  5. are you working on localhost or a live webserver, if(localhost) upload your stuff to a web server, you'll test it better there else make sure your smtp is adequately setup in your php.ini file
  6. $yearsql = mysql_query("SELECT * FROM bookings order by arrival_date desc LIMIT 1"); if(@mysql_num_rows($yearsql) > 0) { while($a = mysql_fetch_array($yearsql)) { echo $a['arrival_date']; } } check that your database fields are named correctly though
  7. these 2 tutorials should be sufficient to your needs: http://www.tutorialized.com/view/tutorial/PHP-Confirm-Registration-Link/53692 http://www.tutorialized.com/view/tutorial/Creating-a-Secure-PHP-Membership-System-using-MySQL/51627 add login functionality and your clients will be able to see the products once they login
  8. i concur with jay that http_post_vars may be deprecated, i do not understand that you used $_POST for database insertion and not for storing into variables, and you are doing double the work, here is how i would code it: <?php $con = mysql_connect("localhost","me","mypassword"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("final_project", $con); $username = $_POST['Username']; $email = $_POST['email']; $Firstname = $_POST['Firstname']; $Lastname = $_POST['Lastname']; $Issue = $_POST['Issue']; $Category = $_POST['Category']; $Dept = $_POST[Department]; $sql="INSERT INTO Persons (Username,FirstName, LastName, Department,Issue,Category) VALUES ('".$username."', '".$Firstname."','".$Lastname."','".$Dept."','".$Issue."','".$Category."')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } mysql_close($con) if( mail($email,$Firstname,$Lastname,$Issue,$Category)){ print ("your mail was sucessfully sent to $email"); }else print "unable to send mail to $email"; echo "<br>"; echo "You records have been updated"; ?> check your code against this code. You had a $to variable which was not assigned anything, you should also sanitize your inputs, use functions such as trim, addshashes and strip_tags, hope you get it sorted
  9. hi there, i am having a problem using an input type image as a button. the thing is i would like it to act like a input type button as opposed to an input type submit. i have an javascript onclick event for this button, and this works as intended, but then it goes to the page which in the form's action tag afterwards, is there any way of stopping this because even if i say return false it still does it, please help.
  10. Hi guys, i am having a problem with $_POST. I am looking at parsing variables dynamically using post: $txt = "txtBox"; for($i = 1; $i <= 5; $i++) { $txt .= "_".$i; $var = $_POST[$txt]; echo $var; } the code i'm using is similar to the one above, but it does not ouptup anything, and i have tried inserting single quotes as well, please help
  11. use sessions, trust me i'm a doctor ( )
  12. hi again guys, this is relevant to this. I am trying to convert an ip address to a country using this tool: http://api.hostip.info/?ip=165.144.244.136 that i found here: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:53430 the problem is i've never done something like this, i would like to send the ip address to the address using something and have the result returned to my site to save onto the database. I really have no idea where to start especially with xml with php, please help.
  13. why dont you use strip_tags it works for me
  14. hi there, i have been looking at user agent alternatives to detect browser and operating systems for a while now, and the scripts i seem to find are really old and they do not seem to have the latest browsers (their latest is ie6). can someone please help me in getting started coz what i want to do is track their ip address and convert it into its country of origin (i already have that covered), but i cant seem to cater for all the different browsers and operating systems out there, can sum1 help.
  15. declare it as global and set register_globals off
×
×
  • 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.