fugix
-
Posts
1,483 -
Joined
-
Last visited
Posts posted by fugix
-
-
so what exactly is wrong here..your echo looks like everything is working fine
-
I'll be nice and post the code since the OP didnt
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="styles/styles.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="Container"> <img src="images/header.gif" width="1000" height="191" alt="Reptile Care Guide" /> <ul id="NavBar"> <li> <div class="tab"> <div class="rollover-tab-div1"></div> <div class="rollover-tab-div2"><a style="margin-top:15px" href="index.html" title="Reptile Care Guide - Homepage">Home</a></div> <div class="rollover-tab-div3"></div> </div> </li> <li> <div class="tab"> <div class="rollover-tab-div1"></div> <div class="rollover-tab-div2"><a href="bearded-dragon.html" title="Reptile Care Guide - Bearded Dragon">Bearded Dragon</a></div> <div class="rollover-tab-div3"></div> </div></li> <li> <div class="tab"> <div class="rollover-tab-div1"></div> <div class="rollover-tab-div2"><a href="corn-snake.html" title="Reptile Care Guide - Corn Snake">Corn Snake</a></div> <div class="rollover-tab-div3"></div> </div></li> <li> <div class="tab"> <div class="rollover-tab-div1"></div> <div class="rollover-tab-div2"><a href="green-anole.html" title="Reptile Care Guide - Green Anole">Green Anole</a></div> <div class="rollover-tab-div3"></div> </div></li> <li> <div class="tab"> <div class="rollover-tab-div1"></div> <div class="rollover-tab-div2"><a href="leopard-gecko.html" title="Reptile Care Guide - Leopard Gecko">Leopard Gecko</a></div> <div class="rollover-tab-div3"></div> </div></li> <li> <div class="tab"> <div class="rollover-tab-div1"></div> <div class="rollover-tab-div2"><a href="blogs.html" title="Reptile Care Guide - Blogs">Blogs</a></div> <div class="rollover-tab-div3"></div> </div></li> </ul> <div id="TabBar"> </div> <div id="MainContent">Content for id "MainContent" Goes Here</div> </div> </body> </html>
@charset "utf-8"; /* CSS Document */ body { background-image: url(../images/bg-tile3.jpg); background-repeat: repeat; } #Container { background-color: #FFF; margin: 0 auto; width: 1000px; } #nav-bar { background-image: url(../images/nav-bar.gif); } #NavBar { background-image: url(../images/nav-bar.gif); height: 38px; width: 1000px; background-repeat: no-repeat; margin-top: 0.2em; padding: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: center; } #TabBar { background-image: url(../images/tab-bar.gif); height: 23px; width: 1000px; margin-top: 1px; } ul { margin: 0px; } #NavBar li { display: inline; float: left; margin-top: 3px; } .tab div { width: 10px; height: 36px; } .tab { } #Container #NavBar li .tab .rollover-tab-div1 { height: 36px; width: 10px; } #Container #NavBar li .tab .rollover-tab-div3 { height: 36px; width: 10px; } .tab:hover .rollover-tab-div1 { background-image: url(../images/rollover-menutab-1.1.gif); width: 10px; } .tab:hover .rollover-tab-div2{ background-image: url(../images/rollover-menu-tab-1.2.gif); } .tab:hover .rollover-tab-div3 { background-image: url(../images/rollover-menu-tab-1.3.gif); } #NavBar li div div{ float: left; width: auto; } #NavBar li a { text-decoration: none; font-family: Verdana, Geneva, sans-serif; font-size: 14px; color: #FFF; font-weight: bold; padding-right: 15px; padding-left: 15px; margin-top: 222px; padding-top: 5px; height: 36px; } .clear-float{ clear:both; margin:0; padding:0; }
-
you can pass your variables into the function using the "global" statement, or the $GLOBALS array..i.e
$results0to4 = array(); function arrayPlacer($comment,$aveScore){ global $results0to4; if($aveScore < 4 && !in_array($comment,$results0to4)){ array_push($results0to4,$comment); return; }
or
$results0to4 = array(); function arrayPlacer($comment,$aveScore){ $results0to4 = $GLOBALS['results0to4']; if($aveScore < 4 && !in_array($comment,$results0to4)){ array_push($results0to4,$comment); return; }
-
yes, you will, if you would like to learn AJAX, click on the "AJAX docs" link in my signature
-
you can actually use ajax if you want.
yes AJAX will work, since it does not try to call PHP using javascript...but instead sends the data to a PHP page to be processed using the XMLHttpResponse
-
this is the last time I will write on this thread, since you do not want to listen. Using the javascript event onclick with a PHP function WILL NOT WORK
-
"onclick" is a javscript event and cannot be used with php. You will either need to convert your code to javascript or find a different method using PHP
-
just modify the code a bit.
echo '<table cellpadding="2" cellspacing="2" border="0" align="center"> <td width="20px" align="center" id="#">#</td>'; foreach(range('A', 'Z') as $currLetter) { echo "<td width='20' align='center' id='$currLetter'"; if($_GET['id'] == $currLetter) { echo ' style="background-color:#F0F;"'; } echo ">$currLetter</td>"; } echo '</table>';
-
why are you using a variable in you url? now im confused, can you explain further what you are trying to do
-
you are trying to call a PHP function using javascript...this will cause unexpected results since PHP is Server-side and Javascript is Client-side
-
What exactly do you mean "what is required?" the code you provide will work much the same as your first code, however the function addslashes() requires its parameter to be a string, not an array as you are trying to use.. Why exactly would you rather write it the second way? I personally would prefer the first way, much easier to distinguish between values
-
how many fields do you have in your db table, just the one?
-
how are you incorporating $_GET['id'] with this table?
-
meh you're right Gizmo, my fault.
-
i would use str_replace()
$string = '<!-- TEXT -->'; $srch = '<!->'; str_replace($srch,'',$string);
-
your submit buttons need to have an attribute of type="submit" not "button" unless you are going to incorporate javascript with them, which it doesnt look like you are
<input name="login" id='login_box' type="submit" value='Log In'/> <input name="login" id='login_box' type="submit" value='Register Now'/>
-
you can also check to see if the session is set
if (isset($_SESSION['loginid'])) { header('Location: member-home.php'); } else { header('Location: teamselections.php'); }
-
I simply added some error_handling, which shouldn't have fixed the issue in itself. Did you figure out what was causing the error?
-
try adding the relative path to your file..
example/path/Novi.png
-
what errors do you receive when adding this to your code?
<?php $to='to@examplecom'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: from@example.com' . "\r\n" . 'Reply-To: rply@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if(mail($to, $subject, $message, $headers)) { echo "Mail sent Successfull"; } else { echo "Mail function fail"; echo $php_errormsg; } ?>
-
no, strip_tags strips the tags from a string a leaves a plain string...mark this topic as solved please
-
i forgot to add the function that will actually use the pattern to grab the info path_info from your url..
$pattern = '/^http\:\/\/www\.[a-zA-Z0-9]+?\.com\/([a-zA-Z-0-9]+?)/'; $subject = 'http://www.example.com/Username'; preg_match($pattern,$subject,$matches); echo $matches[0];
where $matches[0] will contain your string data
-
the html will be non-functional after they are placed into strip_tags()
Are you saying that you dont want the text in between the tags to display at all?
-
if you are talking about the actual text after http://www.example.com/Username,
you can use a regular expression to match the text.
$pattern = '/^http\:\/\/www\.[a-zA-Z0-9]+?\.com\/([a-zA-Z-0-9]+?)/';
Download Link problem
in PHP Coding Help
Posted
I beleive it is because you have two variables next to each other in your script. what does a "view source" show your href to be?