Jump to content

dreamz boy

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

dreamz boy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. problem resolved i used pageid to do title dynamic and it work for me.
  2. i have solved the issue the problem was in php syntax changed $menuDisplay = to $menuDisplay .= and its work for me. i have second issue related to above table(db queries) that i want to create title, keywords and descriptions dynamic for pages created in database. for title i used this sytax $sqlCommand = "SELECT pagetitle FROM pages WHERE showing='1' LIMIT 1"; $query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error()); while ($row = mysqli_fetch_array($query)) { $title = $row["pagetitle"]; } mysqli_free_result($query); but this is not working for me it only insert the first page title to all pages. please guide or tell me what will be php syntax to get title, keywords, and description dynamically. thanks in advanced
  3. i am new in programming and creating my first dynamic website. and problem i am facing is that when i parse the query in the php for menu of my website it gives only one menu link and hides the other pages created in the database.if i create a new page in mysql the parse code hides the previous page link in the menu and shows the newly created page link. i want to make that every page created in database link is shown in menu. and also guide me what changes i have to do if i want to make menu with sub menu option.thanks here are the msql code CREATE TABLE `pages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pagetitle` varchar(255) COLLATE latin1_general_ci NOT NULL, `linklabel` varchar(255) COLLATE latin1_general_ci NOT NULL, `pagebody` text COLLATE latin1_general_ci NOT NULL, `pageorder` int(11) NOT NULL, `showing` enum('0','1') COLLATE latin1_general_ci NOT NULL DEFAULT '1', `keywords` varchar(255) COLLATE latin1_general_ci NOT NULL, `description` varchar(255) COLLATE latin1_general_ci NOT NULL, `lastmodified` date NOT NULL, `extra` varchar(255) COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=4 ; for parsing $sqlCommand = "SELECT id, linklabel FROM pages WHERE showing='1' ORDER BY id ASC"; $query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error()); $menuDisplay = ''; while ($row = mysqli_fetch_array($query)) { $pid = $row["id"]; $linklabel = $row["linklabel"]; $menuDisplay = '<li><a href="index.php?pid=' . $pid . '">' . $linklabel . '</a></li>'; and to display menu php code i am using is <?php echo $menuDisplay; ?>
  4. i am beginner in php and trying to send email in html format using web form .for this purpose i added tinymce in my web form but when i send email i received email in broken html please help. my code is <?php $send = $_POST['send']; if($send){ $email = $_POST['email']; $emailfile = file_get_contents("mailing.txt"); $emaillist = explode("\n", $emailfile); foreach ($emaillist as $value) { mail($value, $_POST['subject'], $_POST['message'], "From: $email"); } echo "<b>Email sent!</b><br />"; } ?> <script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "autolink,lists,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", // 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, // Skin options skin : "o2k7", skin_variant : "silver", // 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> <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post"> <table width="481" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> <td width="84" align="right" valign="top" class="style32">Subject:</td> <td width="397" align="left" class="style32"> <input name="subject" type="text" id="subject" size="41" maxlength="100"> </td> </tr> <tr valign="top"> <td width="84" align="right" valign="top" class="style32">From:</td> <td align="left" class="style32"><input name="email" type="text" id="email" size="41" maxlength="100"></td> </tr> <tr valign="top"> <td align="right" valign="top" class="style32">Message:</td> <td align="left" class="style32"> <textarea name="message" cols="37" rows="4" id="message"></textarea> </td> </tr> <tr valign="top"> <td align="right" valign="top" class="style32"> </td> <td align="left" class="style32"> <input name="send" type="submit" id="send" value="SUBMIT"> <input name="Reset" type="reset" id="Reset" value="RESET"> </td> </tr> </table> </form>
×
×
  • 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.