Jump to content

Northern Flame

Members
  • Posts

    816
  • Joined

  • Last visited

    Never

Everything posted by Northern Flame

  1. you can call the session variable. but since you didnt really provide us with much code to work with, I cant help you much.
  2. you could do this with javascript: <select name="selectDatabase"> <option onClick="textArea(this.value)" value=<?php print "<span class='prodid'>$quan => $ $price ea "; ?></option> then have your textarea be like this: <textarea id="textArea"></textarea> and heres the javascript: function textArea(option){ getElementById("textArea").innerHTML=option; }
  3. this should be in the html section, but anyways, try this: <input type="hidden" name="metode" value="TableName.FieldName" />
  4. can you explain the structure of your table?
  5. what exactly is your question? do you not know how to pull the information from your database? or do you not know how to display it? or what? if you want to pull the information, you need to run a mysql_query() selecting the x amount of topics and order them by DESC (x will be the number of results you want displayed) then just echo your data. I could be more descriptive but I dont know how your table is set up
  6. all of them seem to be missing a good footer, I mean I think you should have more than "Powered by Motif EST"
  7. first thing i noticed was the scroll bar where the main content goes, to fix this you can change the HTML code and use tables, or you can use divs using the method of faux columns: http://www.alistapart.com/articles/fauxcolumns/ also, your page is not HTML valid: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.kuhac.co.uk%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
  8. you dont really need ajax, you could just have each thread have a form under it with a textarea in which you can type something and just submit it.
  9. you mean like this?: <html> <head> <title>Form</title> </head> <body> <?php if(!isset($_POST['submit'])){ ?> <form id="form1" name="form1" method="post" action="<? $PHP_SELF ?>"> <p> <input type="radio" name="group1" value="personal"> Personal Information <br> <input type="radio" name="group1" value="work" checked> Work Information</p> <p> <label> <input type="submit" name="submit" id="submit" value="continue..." /> </label> <br> </p> </form> <?php } else{ $group1 = $_POST['group1']; if ($group1 == "personal"){ print<<<HERE <form id="form1" name="form1" method="post" action="process.php"> <p><strong>Personal Information</strong></p> <p>Full Name: <label> <input type="text" name="name" id="name" /> </label> </p> <p>Cell Phone: <label> <input type="text" name="cellphone" id="cellphone" /> </label> </p> HERE; } else if ($group1 == "work") { print<<<HERE <form id="form1" name="form1" method="post" action="process.php"> <p><strong> Work Information</strong></p> <p>Company Name: <label> <input type="text" name="company" id="company" /> </label> </p> <p>Work Phone: <label> <input type="text" name="workphone" id="workphone" /> </label> </p> HERE; } print<<<HERE <hr /> <p><strong>Other Information</strong></p> <p>Your message:</p> <p> <label> <textarea name="message" id="message" cols="45" rows="5"></textarea> </label> </p> <p> </p> <p> <label> <input type="submit" name="submit" id="submit" value="Submit" /> </label> </p> HERE; } ?> </form> </body> </html>
  10. the first thing i recommend you doing is checking your spelling so i can understand what you're trying to say....
  11. wait a minute, i just realized, this code: function _vars_callback($matches){ $var = $this->_var_callback($matches); return('<?= '.$var.'?>'); } doesnt really make sense, you're just going in circles, I'm not too sure, but I think you're trying to do this: function _vars_callback($matches){ echo $matches; }
  12. well after the user submits, have the page that processes the form display the table with the table information AFTER inserting the new information. that should show the updated results
  13. function _vars_callback($matches){ $var = $this->_var_callback($matches); echo $var; }
  14. well since $text->text is an array, you will need to change: public function get_text(){ return $this->text; } to public function get_text(){ foreach($this->text as $val){ echo $val . "<br />\n"; } }
  15. no you would not need to create a sub-directory for each user, it can be done with .htaccess ex: RewriteEngine on RewriteRule ^([^/\.]+)/?$ users.php?user=$1 [L] this will display as: http://www.website.com/username and send "username" to users.php as an $_GET variable, so you can call it with echo $_GET['user'] in users.php
  16. remember to hit "Topic Solved" if you have no more questions
  17. $from = "From: you@you.com"; mail($to, $subject, $body, $from); or $from = "From: Your Name<you@you.com>";
  18. i know how to do it like this: http://www.yourwebsite.com/username if you want it like that....
  19. put this code on top of the html <?php if (isset($_POST['addPatient'])){ if(empty($petName) || empty($petSpecies) || empty($petBreed)) { header("Location: http://kate/~bradk/newPatient.php"); } //Adding patient into database $createQuery2 = "INSERT INTO tblPatientBK (petName, petSpecies, petBreed, petAge, petWeight, ownerID) VALUES ('$petName','$petSpecies','$petBreed','$petAge','$petWeight','$ownerID')"; $result = mysql_query($createQuery2); //preforming mysql $createQuery2 //displaying message to let user know the task has been carryed out and the patient has been added echo ("Thank you<p>Your new patient has been added successfully.<p>"); echo("<a href='index.php'><font color='blue'>Return to home page</font></a>"); } else ?>
  20. header("Location: http://www.website.com/redirect_here.php"); replace http://www.website.com/redirect_here.php with the URL of where you want to redirect them to
  21. In my register page, an email is sent out to the user once he/she registers. The email is sent and everything works fine, but the email is sent 2 or 3 days after registering! why is it taking so long? im on a shared host so I can't modify my php.ini file, but is this something that should be changed from the php.ini file? (so that i can contact my host about this). Any ways, just in case it can help, heres my mail() code: <?php $headers = "From: My Website<register@website.com>\r\n"."Reply-To: register@website.com"."\r\n"."X-Mailer: PHP/" . phpversion(); mail("$mail", "Confirmation", " Dear $user, In order to be registered to My Website, you must click the link below. If you do not click that link in 1 week, your account will be deleted! Your login information is listed below (save this information!): Username: $user Password: $pass To complete your registration, click this link: http://www.website.com/members/confirm.php?action=register&username=$user&key=$key This message was brought to you by My Website. Please do not reply to this message. If you did not register to this site, just ignore this email and your information will be taken off our database in 1 week. - My Signature", $headers); ?>
  22. <?php foreach($_POST['bar'] as $val){ echo "$val<br />\n"; } ?>
  23. you only want to run the foreach() function once? or run the stuff inside the foreach() once?
×
×
  • 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.