Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. Have you configured PHP to use an SMTP server for sending emails yet? Where are you running this code from?
  2. Place these in reverse order RewriteRule ^([0-9a-z\_]+)/$ /index.php?pname=$1 [L] RewriteRule ^([0-9a-z\_]+)/([0-9a-z\_]+)/$ /index.php?pname=$1&spname=$2 [L] RewriteRule ^([0-9a-z\_]+)/([0-9a-z\_]+)/([0-9a-z\_]+)/$ /index.php?pname=$1&spname=$2&sspname=$3 [L] So it should be RewriteRule ^([0-9a-z\_]+)/([0-9a-z\_]+)/([0-9a-z\_]+)/$ /index.php?pname=$1&spname=$2&sspname=$3 [L] RewriteRule ^([0-9a-z\_]+)/([0-9a-z\_]+)/$ /index.php?pname=$1&spname=$2 [L] RewriteRule ^([0-9a-z\_]+)/$ /index.php?pname=$1 [L]
  3. I'm guessing you are inserting the values into a database? Once you have inserted your data into the database you'll want to preform a redirect eg: header('Location: somepage.php') Otherwise your browser will resend what you just entered in your form when you refresh the page.
  4. You need to echo out your url.
  5. You'll want to use preg_match_all.
  6. You'll first need to wrap your code in <form></form> tags. Then after the closing select tag (</select>). You'll want to place your submit button.
  7. The issues you seem be having are most probably to do drivers. I'm guessing you're using Windows. To see if there any driver issues go to Device Manager and see if Windows is identifying your hardware correctly. Device manager will flag up any problems with hardware.
  8. Your code should be <?php $adminid = $_SESSION['UGsurv_admin']; $query = "SELECT name FROM admin WHERE adminid = '$adminid'"; $result=mysql_query($query); $row=mysql_fetch_array($result, MYSQL_ASSOC); $name = $row['name']; echo "<h2>Welcome, $name</h2><br />\n"; $date = date("l, F j, Y"); echo "<h2>Today's date: $date</h2><br />\n"; echo "<h2><br />Survey Results:</h2>\n"; echo "<table width=\"100%\" cellpadding=\"1\" border=\"1\"\n"; echo "<tr><td><strong>Firm Name</strong></td><td><strong>Preferred Dates</strong></td><td><strong>Est. Number of Attendees</strong></td><td><strong>Prior Attendance?</strong></td><td><strong>Prior Topics Found Most Valuable</strong></td><td><strong>Topics of Most Interest</strong></td></tr>\n"; $query = "SELECT survid,firmname,prefdates,estnum,attb4,comments,comments2 FROM survey ORDER BY survid"; $result = mysql_query($query); while($row=mysql_fetch_array($result, MYSQL_ASSOC)) { $survid = $row['survid']; $firmname = $row['firmname']; $prefdates = $row['prefdates']; $estnum = $row['estnum']; $attb4 = $row['attb4']; $comments = $row['comments']; $comments2 = $row['comments2']; printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n" , $firmname, $prefdates, $estnum, $attb4, $comments, $comments2); if ($estnum == 0) echo " <font color=\"ff000\">No</font><br />\n"; else echo "<br />"; } echo "</table><br /><br />\n"; ?> NOTE: when posting code in the forum please use the tags.
  9. My code is only an example. You will need to modify it in order for it work properly, for example you need to change where it says members_table with the name of the table that holds your users. memberID will also need to be changed to the field that holds your members id's $query = "SELECT * FROM members_table WHERE memberID = '$memberID'";
  10. Does your host allow mod_rewrite or the use of .htaccess files? You'll want to contact with your host about this.
  11. Just done a quick google search for "CMS inline editing" and found a cms called conrete5. Why not give that a go.
  12. Actually iframe allowing me to scrolling on my template if i do not use iframe then it will not scroll down.so its necessory to use . If you use iframe then any variables you define will not be available to a.php You don't have to use iframes to allow for scrolling. You should look into the overflow CSS property. Example <div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div><div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div>
  13. Pretty much any CMS will have these features. Have you looked at any CMS's? Most recommend Joomla
  14. Because variables do get passed between pages. You'll want to use include instead.
  15. If I'm not mistaken but the code for displaying the next 10 blog entries will be completely separate to your current code.
  16. You'll want to use the QSA flag on your rewriterule
  17. PHP will treat all code stored in your database as plain text. You'll have to use eval to execute the code you have stored in your database. eg $mysqlValue='myfunction($param1value="1",$param2value="2",$param3value="3");'; eval("$mysqlValue");
  18. If you only want to show the profile for the id specified in the url, eg 123 then this is how I'd do it <?php // connect to mysql here etc // check that memberID is declared in the url, eg profile.php?member=123 if(isset($_GET['member']) && is_numeric($_GET['member'])) { // get the member id $memberID = (int) $_GET['member']; // Select only the row that matches memberID being requested, eg 123 $query = "SELECT * FROM members_table WHERE memberID = '$memberID'"; $result = mysql_query($query); // check that the query returned one row, meaning a match was found if(mysql_num_rows($result) == 1) { // grab the results from the query $row = mysql_fetch_assoc($result); // display profile here printf('<pre>%s</pre>', print_r($row, true)); } // a match was not found. Display an error instead else { echo '<p style="color:red">Member does not exists</p>'; } } // Either the member id was not declared or it was invalid. Display an error else { echo 'Invalid member id specified'; } ?>
  19. If that's the case, then nothing will be displayed as $memeber can not match $memberID, This is what this if statement is saying if ($member == $memberID) { I dont understand how $member can be the same as $memberID. I need to see more code so I can understand whats going on.
  20. How/where is $member and $memeberID being defined?
  21. Yes that is the correct format for the url. Anything after the ? is called a query string.
  22. You can change your radio button values by modifying the value attribute, eg <input type="radio" name="grade1" value="0" id="RadioGroup1_0" /> very poor <input type="radio" name="grade1" value="1" id="RadioGroup1_1" /> poor <input type="radio" name="grade1" value="2" id="RadioGroup1_2" /> ok <input type="radio" name="grade1" value="3" id="RadioGroup1_3" /> good <input type="radio" name="grade1" value="4" id="RadioGroup1_4" /> excellent
  23. The code should be print '<br>Product Image: <img src="' . $row['ProductImage'] .'" />'; OR print "<br>Product Image: <img src=\"" . $row['ProductImage'] . "\" />";
  24. In check.php you'd use $_POST['name']
×
×
  • 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.