PHP - Complicated String/array/variable Issue
For this example, $row2['author'] = "1"
$user = 'user'.$row2['author']; if (!isset($$user)){ $result = $connector->query('SELECT * FROM users WHERE ID = '.$row2['author']); $$user = $connector->fetchArray($result); } echo '<a href="user.php?user='.($$user['ID']).'">'.$$user.'</a></p>'; The problem is it is a weird variable that also has an array, but when i use echo $$user['ID']; It errors out saying Notice: Quote Undefined variable: u So I am wondering how to word it to set the variable up properly, and how to call items in the array. Thanks in advance Similar Tutorialshaving issues with Code: [Select] echo curl_setopt($ch, CURLOPT_POSTFIELDS,"name='. $name .'&email='. $email .'&macs='.$mac_addresses.'&serial=".$serialnumber); the thing is $mac_addresses is a serialized array that should look like this Code: [Select] 4a:4:{i:0;s:14:"98340234820384";i:1;s:16:"0980342883408230";i:2;s:11:"72843729374";i:3;s:16:"4209384082304980";} but when I unserilize $mac_addressed and echo it I get Code: [Select] \'.a:4:{i:0;s:14:\"98340234820384\";i:1;s:16:\"0980342883408230\";i:2;s:11:\"72843729374\";i:3;s:16:\"4209384082304980\";}.\' can anyone see what my issue is? Hi Guys I'm sure this is really simple for you experts but it's proving to be my nemesis! I have an array of words: eg. $words = array('Apples','Bananas','Cherries'); and would like to search a string of text for these words and create link tags around them based on a simple template, <a href="#">$word_found</a> $text = "I love eating apples and bananas but hate cherries!"; So i would like to return a string like this: $text = "I love eating <a href=#>apples</a> and <a href="#">bananas</a> but hate <a href="#">cherries!</a>"; Now, I need it to do a case insensitive search, but just wrap tags around the words it finds, leaving the case as it was found in the string. I want to avoid using a function where I have to list all the replacements like this: function replace_text($text){ $replace = array('apples' => '<a href="#">apples</a>','bananas' => '<a href="#">bananas</a>'); $text = str_ireplace(array_keys($replace), $replace, $text); return $text; } because it seems very messy and long winded. Also it's not case insensitive. It seems like there must be a way of simply searching for the words in my array and wrapping tags around the found words. Please can anyone help!? Many Thanks Dan I want to get the most recent 15 instances of my a_players_review table THEN sort them by grade, then last name. Ordering the r.id first just gives me a list of rows that I can't do much else with, unless I'm missing how I can code the output. Below is what I had. ORDER BY looked good until I started filling in more rows and seeing kids in grade = 2021 pushing more recent rows off the list. Nested ORDER BY seems frowned upon, and I'm not even sure they work. I kept getting parameters errors. I really can't make heads or tails of nested SELECTs. That might be the answer, but I've been unable to take what I've seen and apply it without getting a parameters error.
$query = "SELECT *,p.id,b.playerID,b.id,s.toggle AS stoggle,o.toggle AS otoggle,p.city,p.school,s.city,s.school,r.opp_city,r.opp_school,o.city,o.school,r.city,r.school FROM a_players_reviews r LEFT JOIN a_players p ON CONCAT (r.nameFirst,r.nameLast) = CONCAT (p.nameFirst,p.nameLast) LEFT JOIN a_schools s ON CONCAT(r.city,r.school) = CONCAT(s.city,s.school) LEFT JOIN a_schools o ON CONCAT(r.opp_city,r.opp_school) = CONCAT(o.city,o.school) LEFT JOIN a_player_bookmark b ON p.id = b.playerID && '". $userID ."' = b.userID WHERE p.id = b.playerID && '". $userID ."' = b.userID && bookmark>0 ORDER BY p.grade,p.nameLast,r.id desc LIMIT 15 "; Edited April 7, 2020 by Jim R Hello I am busy trying to setup a free to use budgeting and cashflow tool. I was recently going through my finances and whilst I found lots of spreadsheets on the subject, I didn't find a website that would allow me to store my data anonymously and access it when and where I felt fit. Bare in mind that I am a bit of a novice so go easy on me... So firstly, I've setup a page to collect 'account' information...that is, income items and expense items. I ask them to enter the amount, the frequency and when the next due date is. The DB looks like this: Code: [Select] CREATE TABLE IF NOT EXISTS `income_accounts` ( `inc_acc_ID` int(11) NOT NULL AUTO_INCREMENT, `user_ID` int(11) NOT NULL, `freq_ID` int(11) NOT NULL, `amount` decimal(7,2) NOT NULL, `next_due` date NOT NULL, `income_typeID` int(11) NOT NULL, PRIMARY KEY (`inc_acc_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=105 ; and the same for expense 'accounts': Code: [Select] CREATE TABLE IF NOT EXISTS `expense_accounts` ( `exp_acc_ID` int(11) NOT NULL AUTO_INCREMENT, `user_ID` int(11) NOT NULL, `freq_ID` int(11) NOT NULL, `amount` decimal(7,2) NOT NULL, `next_due` date NOT NULL, `ex_typeID` int(11) NOT NULL, PRIMARY KEY (`exp_acc_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; So once I have these entered by the user I should be able to then generate a cashflow forecast. For example, I give 5 options for the user: '4 weeks' , '8 weeks', '3 months', '6 months' '12 months'. Selecting one of these will then generate a table listing all of the items that apply for each period with a total at the bottom. Lets take '4 weeks' for an example. First I need to determine if the 'next_due' value is within the time period selected (4 weeks). If it is, what frequency is it? If it is every week then each column of the 4 column table created (i.e. 4 weeks/4 columns) will have it in it. If it is monthly frequency it will be only in the column for which it is due (i.e. column 1 would be todays date to todays date +6, column 2 = todays date + 7 to todays date +13 etc...) This will go through both the income table and the expense table and once all the items have been checked and added to the page table a further row would be added to total all the items in each column, and give a sum (i.e. sum of incomes less sum of expenses). For the '6 month' and '12 month' option, I want to display 1 month per column, rather than 1 week...just to not squeeze things up to much... I do not have a great deal of experience with arrays but my instinct tells me that they are the answer....otherwise I guess I could create a temporary DB table? I'm happy to share the code I've written so far if it helps...otherwise any advice on the best way to achieve this would be great. Hi, I am trying to make some adjustments to uploadify.php which comes with the latest version of uploadify (3.0 beta), so that it works with a session variable that stores the login username and adds it to the path for uploads. Here is uploadify.php as it currently looks: Code: [Select] <?php session_name("MyLogin"); session_start(); $targetFolder = '/songs/' . $_SESSION['name']; // Relative to the root if (!empty($_FILES)) { $tempFile = $_FILES['Filedata']['tmp_name']; $targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder; $targetFile = rtrim($targetPath,'/') .'/'. $_FILES['Filedata']['name']; // Validate the file type $fileTypes = array('m4a','mp3','flac','ogg'); // File extensions $fileParts = pathinfo($_FILES['Filedata']['name']); if (in_array($fileParts['extension'],$fileTypes)) { move_uploaded_file($tempFile,$targetFile); echo '1'; } else { echo 'Invalid file type.'; } } echo $targetFolder; ?> I added Code: [Select] echo $targetFolder; at the bottom so that I could make sure that the string returned was correct, and it is, i.e. '/songs/nick'. For some reason though, uploads are not going to the correct folder, i.e. the username folder, but instead are going to the parent folder 'songs'. The folder for username exists, with correct permissions, and when I manually enter Code: [Select] $targetFolder = '/songs/nick';all works fine. Which strikes me as rather strange. I have limited experience of using php, but wonder how if the correct string is returned by the session variable, the upload works differently than with the manually entered string. Any help would be much appreciated. It's the last issue with a website that was due to go live 2 days ago! Thanks, Nick So I'm trying to create an Array from a comma separated string containing array{s}. How can I take a string full of comma separated hex values such as : <?php $myStr = ( "00ffff", "00cccc", "009999", "007777", "004444", "001111", "01ffff", "01cccc", "019999" ); ?> & turn it into 3 separated arrays like : <?php $myNewArrs = [ Array1 ( 3 ), Array2 ( 3 ), Array3 ( 3 ), ]; ?> which REALLY looks like : <?php $myNewArrs = [ Array ( "00ffff", "00cccc", "009999" ), Array ( "007777", "004444", "001111" ), Array ( "01ffff", "01cccc", "019999" ), ]; ?>
? Thank you & have a great afternoon!
Edited May 27 by AquariaXI Hi guys im in the middle of optimizing code.. Code: [Select] $sql = "SELECT * FROM sa_enemystats WHERE username='$username'"; $res = mysql_query($sql); while ($row = mysql_fetch_assoc($res)) { $enemy['current_health'] = $row['current_health']; $enemy['current_skill'] = $row['current_skill']; $enemy['level'] = $row['level']; $enemy['damage'] = $row['damage']; $enemy['evade'] = $row['evade']; $enemy['accuracy'] = $row['accuracy']; $enemy['speed'] = $row['speed']; $enemy['luck'] = $row['luck']; echo 'debug: variables synced with db table'; }I know that the setting of these variables are messy and can be done in a better way... but how? I have tried foreach and copying other's code for an array copy but it lead no where. Then again my syntax could be wrong... I used something like Code: [Select] foreach ( $enemy[$value] as $row => $value) { $enemy[$value] = $row[$value]; } I need a help in the following : I have an admin page from where the admin attaches an gif image.This attached image should be shown to the user as a scrolling image. The code for the scrolling image is done through javascript. So my actual problem is getting the name of the attached gif image to the javascript array which is used for scrolling horizontally. I need to see if someone can point out something that I have missed or maybe even point me in the right direction on something. I have a PHP script that I have run into a problem on. The basic idea of the script is that it will send out HTML formatted emails to users of my web site. The problem I am running into is storing the HTML content in memory so I can do a str_replace() looking for certain markers in the HTML and replace them with lets say the users name and custom links that pertain to the particular user that the email is going to. Currently the HTML is being stored in a MySQL database, but I have already tried reading it from a flat file. Each time I only get the first 1024 characters returned. The problem seems to be that I am running into a PHP STRING limitation. From the reading that I have done on the subject, the limit should be 1024 characters PER LINE with the variable able to hold somewhere around 8MB worth of data. I can tell you that it does not matter how many \n I put into the HTML I still only get the first 1024 characters. Is there a way I can get the entire HTML file (about 12k characters) in memory so I can work with it and hand it off to the mail function? Thanks, whit3fir3 I am trying to insert a variable into this post string: curl_setopt ($ch, CURLOPT_POSTFIELDS, 'p_entity_name=The+Company+Name+LLC&p_name_type=A&p_search_type=BEGINS'); I want to replace company name with $name like: curl_setopt ($ch, CURLOPT_POSTFIELDS, 'p_entity_name='+ $name + 'p_name_type=A&p_search_type=BEGINS'); Hi there, im trying to have a form show up when user clicks "add joke". I need the variable to be retrieved from the url query string. I cant get the form to show up. I think its either an issue with the GET function at the top or the link down at the bottom. Please help! <?php // If the user wants to add a joke $_GET['addjoke'] = $addjoke; if (isset($addjoke)): ?> <FORM ACTION="<?php echo($PHP_SELF); ?>" METHOD=POST> <P>Type your joke he <BR> <TEXTAREA NAME="joketext" ROWS=10 COLS=40 WRAP> </TEXTAREA><BR> <INPUT TYPE=SUBMIT NAME="submitjoke" VALUE="SUBMIT"> </FORM> <?php else: // Connect to the database server $dbcnx = @mysql_connect("servername", "username", "password"); if (!$dbcnx) { echo( "<P>Unable to connect to the " . "database server at this time.</P>" ); exit(); } // Select the jokes database if (! @mysql_select_db("jhodara2") ) { echo( "<P>Unable to locate the joke " . "database at this time.</P>" ); exit(); } // If a joke has been submitted, // add it to the database. $joketext = $_POST['joketext']; $submitjoke = $_POST['submitjoke']; if ("SUBMIT" == $submitjoke) { $sql = "INSERT INTO jokes SET " . "JokeText='$joketext', " . "JokeDate=CURDATE()"; if (mysql_query($sql)) { echo("<P>Your joke has been added.</P>"); } else { echo("<P>Error adding submitted joke: " . mysql_error() . "</P>"); } } echo("<P> Here are all the jokes " . "in our database: </P>"); // Request the text of all the jokes $result = mysql_query( "SELECT JokeText FROM jokes"); if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit(); } // Display the text of each joke in a paragraph while ( $row = mysql_fetch_array($result) ) { echo("<P>" . $row["JokeText"] . "</P>"); } // When clicked, this link will load this page // with the joke submission form displayed. echo("<P><A HREF='$PHP_SELF?addjoke=1'>Add a Joke!</A></P>"); endif; ?> see the problem live at http://www.freewaycreative.com/insert2.php below is the script.i use it for to edit a single .html file. but now i want to edit multiple .html file by this script. so i think i have to change dynimacaly (may be a dropdown form) this line $url = "p".$page.".html"; and this line. can any body help? Code: [Select] <?php function br2nl($str) { return preg_replace('=<br */?>=i', "", $str); } $action=$_POST['action']; $textarea=$_POST['textarea']; if($_GET['p']){ $page=$_GET['p']; } // Assume your text pages are called, p1.db or p2.db, etc. $url = "p".$page.".html"; if (file_exists($url)) { // do nothing } else { $url = "p0.html"; } // where to go back to after the edit ... $return="edit.php?p=$edit"; // Get page $data = implode("", file($url)); if($action=="save"){ $newtext=stripslashes($textarea); $newtext = str_replace("<?", "", $newtext); $newtext = str_replace("?>", "", $newtext); $newtext = nl2br($newtext); //echo "page: $url<br><br>\n"; //echo $newtext; $fh = fopen($url, 'w') or die("can't open file"); fwrite($fh, $newtext); fclose($fh); header ("location:edit.php?p=$page"); } else{ ?> <!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>abeer cms</title> <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "css/example.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "js/template_list.js", external_link_list_url : "js/link_list.js", external_image_list_url : "js/image_list.js", media_external_list_url : "js/media_list.js", // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } }); </script> <style> body,html{ margin:0px auto; width:700px; text-align:center; } #content{ margin:0px auto; width:700px; } #middle h1 { color: transparent; font-family:georgia; font-size:12pt; margin:0; color: #dF9100; padding:10px 0px 15px 0px; text-align:left; } </style> </head> <body> <div id='content'> <? $ta=br2nl($data); echo" <a href='$return'><-- Return to Page</a><br /><br /> Make Changes and click \"Save Changes\" at the very bottom ...<br /> <form action='edit.php' method='post'> <input type='hidden' name='action' value='save'> <input type='hidden' name='p' value='$page'> <input type='hidden' name='n' value='$n'> <textarea name='textarea' rows='25' cols='80'>$ta</textarea> <br /> <input type='submit' name='submit' value='Save Changes'> </form> <div id='middle' style='width:680px; text-align:left; padding-left:20px; border:1px solid #ccc;'> </div> </div> </body> </html> "; } ?> //$value1 = $_POST['game']; $value1 = "game7h"; if (strpos($value1, 'a')) { $team = 'a'; }elseif (strpos($value1, 'h')) { $team = 'h'; } if (strpos($value1, '7')) { $num = '7'; } elseif (strpos($value1, '8')) { $num = '8'; } elseif (strpos($value1, '9')) { $num = '9'; } $gm7hodds = $games[41]["BP"]; $gm7aodds = $games[40]["BP"]; $gm8hodds = $games[47]["BP"]; $gm8aodds = $games[46]["BP"]; $gm9hodds = $games[53]["BP"]; $gm9aodds = $games[52]["BP"]; /* $getratio = $num + $team; echo $getratio; Team is not a math operation so I'll finesse that later. */ $findratio = 'gm' . $num . 'h' . 'odds'; echo $findratio; gm7hodds How would I add the $ to it and return its array value $gm7hodds? Solved whoops -> echo eval('return $'. $findratio. ';'); Edited April 28 by Minzersolved Hello guys, basically i am doing a search function based on regular expressions. What i have done is to store the string i want to regex as a variable. Variable is named as $new_string -> preg_split("/\.\(.*\)\.\(.*\)/", $file); So inside the while loop, i would like to call another variable to store $new_string. However, I found out that the preg_split function stored inside $new_string doesn't work. If i use preg_split function directly inside the while loop it will work - > refer to //$parts = preg_split("/\.\(.*\)\.\(.*\)/", $file); I have troubleshooted it for like 1 hour plus.hope someone can help me thanks <?php //"$DOCUMENT_ROOT"."new/"; $current_dir = 'C:\xampp\htdocs\Audit_Reports'; //Put in second part, the directory - without a leading slash but with a trailing slash! $dir = opendir($current_dir); // Open the sucker $newArgument = $_POST[argument]; $newArgument1 = $_POST[argument1]; $string ='preg_split("/\.\(.*\)\.\(.*\)/", $file);'; $new_string = preg_replace("#\/\\\.\\\\\(\.\*\\\\\)#","/\.\\($newArgument\)",$string); $new_string = preg_replace("#\\\.\\\\\(\.\*\\\\\)#","\.\\($newArgument1\)", $new_string); echo ("<p><h1>List of Audit Reports:</h1></p><hr><br />"); while ($file = readdir($dir)) // while loop { //$parts = preg_split("/\.\(.*\)\.\(.*\)/", $file); $parts = $new_string; echo $parts; if (is_array($parts) && count($parts) > 1) { // does the dissected array have more than one part $extension = reset($parts); // set to we can see last file extension if ($extension == "Audit_Report" OR $extension == "audit_report") // is extension ext or EXT ? echo "<a href=\"$file\" target=\"_blank\"> $file </a><br />"; // If so, echo it out else do nothing cos it's not what we want } } echo "<hr><br />"; closedir($dir); // Close the directory after we are done ?> <form action="readdirectory.php" method='post'>Search Files:<p> Hostname: <input type="text" name="argument"<p> IP Address: <input type="text" name="argument1"<p> Date: <input type="text" name="argument2"<p> <p><input type="submit" name="submitFinal" value="Update"> <p> </form> </p> apparently I am doing this wrong. I want my string results from a form that searches DB content to appear within HTML table, tr, td tags. I get the results fine, but the HTML part isn't appearing. How should I be doing this? <?php $string = ''; $result = mysql_query($sql); /// This is the execution if (mysql_num_rows($result) > 0){ while($row = mysql_fetch_object($result)){ echo "<table>"; echo "<tr>"; $string .= "<td>".$row->last_name."</td> "; $string .= "<td>".$row->first_name."</td>"; $string .= "<td>".$row->employee_id."</td>"; $string .= "<td>".$row->title."</b>"; $string .= "<td>".$row->territory."</td>"; $string .= "<td>".$row->district."</td>"; $string .= "<td>".$row->Phase1A_Score."</td>"; $string .= "<td>".$row->Phase1B_Score."</td>"; $string .= "<td>".$row->Phase1_Average."</td>"; $string .= "<td>".$row->Phase1A_HS_Exam."</td>"; $string .= "<td>".$row->Phase1A_HS_Exam_RT."</td>"; $string .= "<td>".$row->Phase1B_HS_Exam."</td>"; $string .= "<td>".$row->Phase1B_HS_Exam_RT."</td>"; $string .= "<td>".$row->Class_Date."</td>"; $string .= "<td>".$row->Awards."</td>"; $string .= "<br/>\n"; echo "</tr>"; echo "</table>"; } }else{ $string = "No matches found!"; } echo $string; ?> Hi Everyone, I have built a website utilizing a PHP abstract Webpage class to create the pages. When creating another class that inherits from Webpage class I rewrite abstract functions, etc. where needed. When instantiating an object of the extended classes I pass the constructor the $page_title, $css_file, $meta_data, $keywords, etc., etc.. I am able to pass html markup in a string variable to a class level "Setter" function to populate a "main area" of the website and all works perfectly. However, I have a contact form which I send the "Submit Message" button click to a PHP function that takes care of making sure the form fields are not empty, then sends email and returns a success message back to the calling page, if they are empty, the function returns what fields are empty(required). If the page includes empty and populated fields I want to put the populated fields into session variables so that I may populate the fields when the user is taken back to the page and display to the user the required fields that were empty(this functionality is already within the function). This brings me to my question(see code below for reference): Seeing that I am populating a variable with a string it seems I cannot use an if statement, echo or the like, my IDE gives me errors. How may I insert an if statement where needed to populate the empty form fields? Code: [Select] include('../php_functions/functions.php');//for the chechData() function $error_message = NULL; if(isset($_POST['submit'])) { $error_message = checkData($_POST, 'Renovation & Consulting'); } $main_content = '<form method="post" action=""> <fieldset id="contactform"> <legend>Renovations & Consultations</legend>'. [color=red]//placing a variable here works fine![/color] $error_message .'<div class="row_div"> <div class="label_div"> <label>First Name:</label> </div> <div class="input_div"> <input name="First Name" type="text" maxlength="50" size="50" value="'.[color=red]if(session variable not empty) echo it here;.'"[/color] /> </div> </div> <div class="row_div"> <input name="submit" type="submit" value="Send Message" /> </div> </fieldset> </form>'; Thanks for any and all responses. Chuck Hey there. Thinking this should be an easy one but I can only seem to find info on the string replace function. What I'm trying to do is strip everything after the @ from an email variable. So for example $mail variable comes in as me@gmail.com How would I strip the variable to only contain me and remove the @gmail.com I'll keep searching for the answer myself but if anyone can throw me a bone it's be appreciated. Cheers Hi, My issue here is that I cant get my query string variables to ONLY feed into if/else statement on my secondary page. I include my secondary page (fine.php) from my index page. My query string variables keep being fed back into my original if/ese statement on index.php. here is the if/else on index.php (these links work fine): <?php if($_SERVER['QUERY_STRING']=='/index.php' || $_SERVER['QUERY_STRING']=='') { include 'port.php'; } elseif (isset($_GET['pos'])){ include 'pos.php'; } elseif (isset($_GET['web'])){ include 'web.php'; } elseif (isset($_GET['fine'])){ include 'fine.php'; } else {include '404.php';} here is the if/else on my secondary page (fine.php). These links are supposed to alert the if/else in the next table cell. However, they instead alert the if/else in index.php. <td><br/> <a href="?backset"><img src="fine/thumbs/x-backset.jpg" border="0"></a><br/><br/> <a href="?backside"><img src="fine/thumbs/x-backside.jpg" border="0"></a><br/><br/> <a href="?bannerprint"><img src="fine/thumbs/x-bannerprint.jpg" border="0"></a><br/><br/> <a href="?chopu"><img src="fine/thumbs/x-chopu.jpg" border="0"></a><br/><br/> </td> <td><br/> <div id="DivPiece" align="left"> <?PHP if (isset($_GET['backset'])){ include 'fine/backset.php'; } elseif (isset($_GET['backside'])){ include 'fine/backside.php'; } elseif (isset($_GET['bannerprint'])){ include 'fine/bannerprint.php'; } elseif (isset($_GET['chopu'])){ include 'fine/chopu.php'; } ?> </div> </td> How can I get the links on the secondary page to only alert the if/else statement on that page, and BLOCK the if/else statement on index.php from seeing them? I still want to use the query string though. Thanks! [/quote] This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=344127.0 |