Jump to content

StroiX

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Everything posted by StroiX

  1. Website: http://bit.ly/Mb4WG Currently, all the categories are displayed in the "sidebar," I would like to use sidebar to bring visitors attention to other things and as you can see, a lot of the space gets taken by categories and visitors would have to scroll down to see other sidebar items. I would like to move the categories inside the "topbar" and I can later move "home, login, register" and etc.. elsewhere. This is the code which generates the categories: <h3>{#KB_Visual_Category_Title#}</h3> <div id="categories"> {checkActionsTpl location="tpl_widget_categories_start"} {section name=thecat loop=$cat_array start=$start} {if $lastspacer eq ""} {assign var=lastspacer value=$cat_array[thecat].spacercount} {/if} {if $cat_array[thecat].spacercount lt $lastspacer}{$cat_array[thecat].spacerdiff|repeat_count:'</ul></li>'}{/if} <li{if $cat_array[thecat].principlecat neq 0} class="dir"{/if}> <a href="{if $pagename eq "upcoming" || $groupview eq "upcoming"}{$URL_queuedcategory, $cat_array[thecat].safename}{else}{$URL_maincategory, $cat_array[thecat].safename}{/if}">{$cat_array[thecat].name}</a> {if $cat_array[thecat].principlecat eq 0}</li>{else}<ul>{/if} {assign var=lastspacer value=$cat_array[thecat].spacercount} {/section} {checkActionsTpl location="tpl_widget_categories_end"} </ul></div> And following is the CSS for it: #categories {margin:0 0 15px 0; padding:10px 15px; font-family:Arial, Helvetica, sans-serif; font-size:12px; background: rgb(243, 243, 243); border-bottom:1px solid #525b6e;} #categories li {list-style:none;} #categories li a {text-decoration:none; font-weight:bold; color:#000;} #categories li li {list-style:disc; padding:0 0 0 3px; margin-left:8px;} #categories li li a {color:#03C;text-decoration:underline; font-weight:normal;} #categories li li a:visited {color: #03C;} #categories li li a:hover {color: #03C;} The CSS would probably need to be trashed, but wanted to show you how I did this. Something like this would be great if it won't break in IE6 (http://woork.blogspot.com/2008/01/di...using-css.html), it doesn't need to have anything fancy if this would create problems. Just a simple horizontal list of categories, when clicked on, would show the sub categories underneath. Any guidance on this would be nice Thank you very much!!! Jacklyn
  2. Web site: http://bit.ly/Mb4WG uhh.. this is strange. When I moved the following code from the underneath the "topbar" to --> right underneath the <head> tag, the whole page goes (except the "topbar" div) goes blank in IE6... no problems in firefox. <!-- START SEARCH --> <div class="topsearch"> <div class="right_float"> {if isset($templatelite.get.search)} {assign var=searchboxtext value=$templatelite.get.search|sanitize:2} {else} {assign var=searchboxtext value=#KB_Visual_Search_SearchDefaultText#} {/if} <form action="{$my_pligg_base}/search.php" method="get" name="thisform-search" id="thisform-search" {php} global $URLMethod, $my_base_url, $my_pligg_base; if ($URLMethod==2) print "onsubmit='document.location.href=\"{$my_base_url}{$my_pligg_base}/search/\"+encodeURIComponent(this.search.value); return false;'"; {/php} > <input type="text" size="20" class="searchfield" name="search" id="searchsite" value="{$searchboxtext}" onfocus="if(this.value == '{$searchboxtext}') {ldelim}this.value = '';{rdelim}" onblur="if (this.value == '') {ldelim}this.value = '{$searchboxtext}';{rdelim}"/> <input type="submit" value="" class="go" /> </form> </div> </div> <!-- END SEARCH --> What I am trying to do is to move the sidebar which was aligned right and inside the "topbar" div to above the "topbar" while still keeping it on the right side. Looks fine in firefox, please take a look... Thanks!
  3. I am sorry, but this was for a different web site.. they looked similar but the HTML code was different. What you had suggested helped, thank you
  4. Web site: http://bit.ly/Mb4WG Problem: I am not sure how to move up the "main" div next to the right sidebar so that both divs are next to each other. This is what is generating the index.php file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="{#PLIGG_Visual_Language_Direction#}" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <div id="container"> {checkActionsTpl location="tpl_pligg_head_start"} {include file="meta.tpl"} <link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/s_orange.css" media="screen" /> {if $pagename eq "submit"}<link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/wick.css" />{/if} {if $Voting_Method eq 2} <link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/star_rating/star.css" media="screen" /> {/if} {checkForCss} {checkForJs} {if $pagename neq "published" && $pagename neq "upcoming"} {if $Spell_Checker eq 1} <script src="{$my_pligg_base}/3rdparty/speller/spellChecker.js" type="text/javascript"></script> {/if} {/if} {if $request_category} <title>{$pretitle} {$meta_description} {if $pagename eq "upcoming"}| {$posttitle} {/if}| {#PLIGG_Visual_Name#}</title> {elseif $pagename eq "groups"} <title>{#PLIGG_Visual_Name#} | {#PLIGG_Visual_Groups#}</title> {elseif $pagename eq "group_story"} <title>{$group_name} - {$group_description} | {#PLIGG_Visual_Name#}</title> {elseif $pagename eq "submit_groups"} <title>{#PLIGG_Visual_Name#} | {$posttitle}</title> {elseif $pagename eq "upcoming"} <title>{#PLIGG_Visual_Name#} | {#PLIGG_Visual_Pligg_Queued#}</title> {elseif $pagename eq "published"} <title>{#PLIGG_Visual_Name#}</title> {elseif $pagename eq "index"} <title>{#PLIGG_Visual_Name#} - {#PLIGG_Visual_RSS_Description#}</title> {elseif $pagename eq "story"} <title>{$pretitle} {$posttitle} | {#PLIGG_Visual_Name#}</title> {else} <title>{$pretitle} {#PLIGG_Visual_Name#} | {$posttitle}</title> {/if} <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$my_base_url}{$my_pligg_base}/rss.php"/> <link rel="icon" href="{$my_pligg_base}/favicon.ico" type="image/x-icon"/> {checkActionsTpl location="tpl_pligg_head_end"} <body dir="{#PLIGG_Visual_Language_Direction#}" {$body_args}> {checkActionsTpl location="tpl_pligg_body_start"} <!-- START CONTENT --> {literal} <script type="text/javascript" language="JavaScript"> function checkForm() { answer = true; if (siw && siw.selectingSomething) answer = false; return answer; }// </script> {/literal} {checkActionsTpl location="tpl_pligg_banner_top"} {include file=$tpl_header.".tpl"} <!-- START LEFT COLUMN --> <div id="contents"> <div id="wrapper"> <!-- START RIGHT COLUMN --> <div class="sidebar"> {include file=$tpl_right_sidebar.".tpl"} {include file=$tpl_second_sidebar.".tpl"} </div> <!-- END RIGHT COLUMN --> <div class="main"> <!-- START BREADCRUMBS --> {if $pagename eq "published" || $pagename eq "index"}<h1>{#PLIGG_Visual_Published_News#}{/if} {if $pagename eq "upcoming"}<h1>{#PLIGG_Visual_Pligg_Queued#}{/if} {if $pagename eq "submit_groups"}<h1>{#PLIGG_Visual_Submit_A_New_Group#}{/if} {if $pagename eq "groups"}<h1>{#PLIGG_Visual_Groups#}{/if} {if $pagename eq "group_story" }<h1>{$group_name}{/if} {if $pagename eq "login"}<h1>{#PLIGG_Visual_Login#}{/if} {if $pagename eq "register"}<h1>{#PLIGG_Visual_Register#}{/if} {if $pagename eq "editlink"}<h1>{#PLIGG_Visual_EditStory_Header#}: {$submit_url_title}{/if} {if $pagename eq "rssfeeds"}<h1>{#PLIGG_Visual_RSS_Feeds#}{/if} {if $pagename eq "topusers"}<h1>{#PLIGG_Visual_TopUsers_Statistics#}{/if} {if $pagename eq "cloud"}<h1>{#PLIGG_Visual_Tags_Tags#}{/if} {if $pagename eq "live" || $pagename eq "live_unpublished" || $pagename eq "live_published" || $pagename eq "live_comments"}<h1>{#PLIGG_Visual_Live#}{/if} {if $pagename eq "advancedsearch"}<h1>{#PLIGG_Visual_Search_Advanced#}{/if} {if isset($templatelite.get.search)}<h1>{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.search|sanitize:2|stripslashes}{/if} {if isset($templatelite.get.q)}<h1>{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.q|sanitize:2|stripslashes}{/if} {if $pagename neq "story" && $pagename neq "user" && $pagename neq "profile" && $pagename neq "submit"} {if isset($navbar_where.link2) && $navbar_where.link2 neq ""} &#187; <a href="{$navbar_where.link2}">{$navbar_where.text2}</a>{elseif isset($navbar_where.text2) && $navbar_where.text2 neq ""} &#187; {$navbar_where.text2}{/if} {if isset($navbar_where.link3) && $navbar_where.link3 neq ""} &#187; <a href="{$navbar_where.link3}">{$navbar_where.text3}</a>{elseif isset($navbar_where.text3) && $navbar_where.text3 neq ""} &#187; {$navbar_where.text3}{/if} {if isset($navbar_where.link4) && $navbar_where.link4 neq ""} &#187; <a href="{$navbar_where.link4}">{$navbar_where.text4}</a>{elseif isset($navbar_where.text4) && $navbar_where.text4 neq ""} &#187; {$navbar_where.text4}{/if} </h1> {/if} {if $pagename eq "profile"}<h1>{#PLIGG_Visual_Profile_ModifyProfile#}</h1>{/if} {if $pagename eq "user"}<h1>{$page_header} <a href="{$user_rss, $view_href}" target="_blank"><img src="{$my_pligg_base}/templates/{$the_template}/images/rss.gif" style="vertical-align:middle;margin-left:6px;border:0;"></a></h1>{/if} {checkActionsTpl location="tpl_pligg_breadcrumb_end"} <!-- END BREADCRUMBS --> {assign var=sidebar_module value="sort_menus"}{include file=$the_template_sidebar_modules."/wrapper2.tpl"} {checkActionsTpl location="tpl_pligg_content_start"} {checkActionsTpl location="tpl_pligg_above_center"} {include file=$tpl_center.".tpl"} {checkActionsTpl location="tpl_pligg_below_center"} {checkActionsTpl location="tpl_pligg_content_end"} </div> <!-- END LEFT COLUMN --> <br style="clear: both;" /> </div></div> {checkActionsTpl location="tpl_pligg_banner_bottom"} {include file=$tpl_footer.".tpl"} <br style="clear: both;" /> </div> <!-- END CONTENT --> <script src="{$my_pligg_base}/templates/xmlhttp.php" type="text/javascript"></script> {* this line HAS to be towards the END of pligg.tpl *} {checkActionsTpl location="tpl_pligg_body_end"} </body> </html> Thanks for looking into this.. counting on you guys :/ Regards, Jacklyn
  5. I am having trouble bringing the sidebar next to the left div up, as you can see here; http://bit.ly/29xZIa I would like both columns to be next to each other have spent quite a bit time messing around... any help would be greatly appreciated! Regards, Dave Byers
  6. Please refer to the web site: http://alturl.com/yhba Please look at the web site mentioned above and pay close attention to the "|" dividing the menu links (Abous, Teams, Events, Shop). Problem: This "|" should not appear at the end of the menu (after the "Shop" link). However it seems that it is showing up in the Windows Firefox & Safari but not in Firefox when being run under the Apple operating system. Please see if it is visible for you and if so, pleassee suggest how I may go about fixing the issue. HTML: <div id="navigation"> <a href="/about" class="navigation-about">About</a> <a href="/events" class="navigation-events">Events</a> <a href="/teams" class="navigation-teams">Teams</a> <a href="/shop" class="navigation-shop last">Shop</a> </div> CSS: #navigation { background:url(../_images/menu_bg.png) repeat-x; height:68px; width:100%; padding:10px 0 10px 0; margin:0 0 20px 0; } /*#navigation a { color:#666; padding: 0 10px 0 10px; text-decoration:none; }*/ .navigation-about, .navigation-events, .navigation-teams, .navigation-shop { float: left; display: block; padding: 0 0 0 12px; font-size: 105%; } #navigation a.last{ background-image: url(); } #navigation-logo { display:block; float:left; margin:3px 0 0 10px; padding-right:25px; } #navigation a, #navigation a:visited { display:block; text-decoration:none; color:#666; padding:0 10px 0 10px; background-image:url(../_images/nav_divider.png); background-repeat:no-repeat; background-position:right; font-weight:bold; } Thank you!
  7. I take that back, it did work! Just had to change the html to: <a href="/shop" class="navigation-shop last">Shop</a> Thank you soo much!!!
  8. gevans, Thanks for your suggestion... I tried it but it still did not remove the divider from the end of the 'shop' link.
  9. Please refer to the following web site: http://alturl.com/iio4 As you can see in the above mentioned web site, there is a "|" menu link divider which displays between the links (About, Events, Teams, Shop). I don't want it to however appear at the end of the last link (shop). I have tried several things but can't seem to get the CSS to remove it just after the last link. Any help with this would be greatly appreciated. Following is both HTML and CSS code: <div id="navigation"> <a href="/about" class="navigation-about">About</a> <a href="/events" class="navigation-events">Events</a> <a href="/teams" class="navigation-teams">Dance Teams</a> <a href="/shop" class="navigation-shop">Shop</a> </div> /***** Navigation *****/ #navigation { background:url(../_images/menu_bg.png) repeat-x; height:68px; width:100%; padding:10px 0 10px 0; margin:0 0 20px 0; } /*#navigation a { color:#666; padding: 0 10px 0 10px; text-decoration:none; }*/ .navigation-about, .navigation-events, .navigation-teams, .navigation-shop { float: left; display: block; padding: 0 0 0 12px; font-size: 105%; } #navigation-logo { display:block; float:left; margin:3px 0 0 10px; padding-right:25px; } #navigation a, #navigation a:visited { display:block; text-decoration:none; color:#666; padding:0 10px 0 10px; background-image:url(../_images/nav_divider.png); background-repeat:no-repeat; background-position:right; font-weight:bold; } Thank you once again! If possible.. pleaseeeee provide a working CSS so I do not misunderstand you.
  10. Please refer to the web page: http://alturl.com/9nsn I would like to move the green box up by 7px. Please help, I can't seem to figure this out to save my life! Have spent a lot of time, not sure what I'm doing wrong. If possible.. pleaseeeee provide a working CSS so I do not misunderstand you. Thank you!
  11. I tried the above in the #container div and it did give me working results. Could you please try this on your browser and see how it works out of you?
  12. Thanks for the suggestions, I might have not understood correctly but I did try however, and did not get what I was wanting to achieve. Please take a look at the web site: http://alturl.com/di3p You can see the red box on the right drop to the bottom as the window is re-sized to a smaller window. I want to leave the web site the way it is.. the "liquidity" of it, just do not want the red sidebar to drop near the bottom. Please provide working example of CSS if possible so I do not misunderstand and do it incorrectly in CSS. Thank you once again!
  13. Hi.. The issue that I am having is that, when I make my browser window smaller horizontally, the 'sidebar' div drops near the bottle of the screen but still stays on the left side. HTML Code: <div id="container"> <div id="content"> <div class="content-box"> <div class="corner TL"></div> <div class="corner TR"></div> <div class="corner BL"></div> <div class="corner BR"></div> <div class="cornerBoxInner"> <div class="main"> <h2>Test</h2> <p>Test</p> </div> <div class="sidebar"> <p>hiii</p> </div> <br style="clear: both;" /> </div> </div> </div> </div> CSS CODE: /***** Main Template *****/ * { margin: 0pt; padding: 0pt; } html { min-width: 945px; } /*IE7*/ body { color: #393733; margin: 0; padding: 0 20px; text-align: center; background: #e5ecf3; } #container { text-align: left; margin: 0 auto; max-width: 1200px; position: relative; } #contents { } .main { width:69%; float:left; padding:10px; } .sidebar { border:1px solid #F00; float:right; width:310px; } /***** Content Box *****/ .content-box { position: relative; background: #fff; width: 100%; margin:-25px 0 0 0;} .corner { position: absolute; width: 10px; height: 10px; background: url('../_images/corners.gif') no-repeat; font-size: 0%; } .cornerBoxInner { padding: 0px 20px 20px 10px; } .TL { top: 0; left: 0; background-position: 0 0; } .TR { top: 0; right: 0; background-position: -10px 0; } .BL { bottom: 0; left: 0; background-position: 0 -10px; } .BR { bottom: 0; right: 0; background-position: -10px -10px; } Any help with this is greatly appreciated! Thank you.
  14. Thanks the "echo" in front of it worked. I did very little PHP about 5 years ago and it has clearly been forgotten. Thanks once again for your help with this.
  15. Still same problem, here is the error again: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /vservers/ssagarco/htdocs/login/index.php on line 37 And line 37 is: echo "<div class=\"login-quickmenu\">"; Please let me know if you would like me to try something else instead and thank you once again!
  16. Thank for your reply. I tried what you posted and I am getting the following error now, any suggestions? Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /vservers/ssagarco/htdocs/login/index.php on line 37 Thank you.
  17. Please help if possible. The following code as of now produces the text on three separate lines, like this: My Account Edit Account Logout However, I would like to display in the following manner instead: My Account Edit Account Logout I would like to link the page to a style sheet and insert a div tag which will also have some other value such as color and etc.. of the hyperlinks. I guess my question is then: How is it possible to insert a div tag and <ul> tag the PHP code below so that I have an unordered list which I could later modify in CSS? Please provide a working example if possible, thank you. <?php /** * User has already logged in, so display relavent links, including * a link to the admin center if the user is an administrator. */ if($session->logged_in){ echo "<a href=\"userinfo.php?user=$session->username\">My Account</a>" ."<a href=\"useredit.php\">Edit Account</a>"; if($session->isAdmin()){ echo "<a href=\"admin/admin.php\">Admin Center</a>"; } echo "<a href=\"process.php\">Logout</a>"; } else{ ?>
  18. That is exactly what I needed. Thank you for the example. =)
  19. Please take a look at http://www.drychalk.com/_/ur/combined.php, here I have the live example of the issue I am having. I would like the "Personal Information" and "Work Information" choice to disappear but have not been successful at this. I hope that someone can help me figure this out. If possible, please also take a look at the whole thing to make sure if I am doing this the proper way by (ex. using heredoc, etc...) Thank you for your time and support. <html> <head> <title>Form</title> </head> <body> <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 $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>
  20. I used to have a separate FORM (step1.php) that asked for "Personal Information" and "Work Information" on a separate .html page which processed "step2.php", however now I have combined these two steps in "combined.php". I am having 2 issues that I am not sure how to tackle and would be gratefull for your help. 1) When "combined.php" is ran, it gives the following error: Notice: Undefined index: group1 in /Web Directory/ur/combined.php on line 26 2) The "Other Information" is always visible now, and I would like it to only show after a choice is made from "Personal Information" or "Work Information", of course it wouldn't matter since this is the information that would show regardless, I just don't want it to show at the time the selection is made. I have played around with a few things, but I don't think I am doing it correctly, and would really appreciate if someone could provide a working example, but your advice is very much needed as well! =) combined.php: <html> <head> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="post" action="step2.php"> <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 $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; } ?> <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> </form> </body> </html> Thank you for your help with this.
  21. Thank you for post! I will give this a shot and will post any problems I run into. Thank you once again! =)
  22. Got it. Thank you! Can someone please also take a look my "process.php" and see if this really is the only best option to insert the data. And please also read the previous post by me.
  23. Quick question for you: you have "print<<<HERE" and "HERE;" in the code... what am I supposed to be replacing this with? Also... as of now I have a "process.php" which the form uses to insert the submitted information into a MySQL database. Should I keep it as it is; separate, or should I include it within the step2.php code. With it being separate right now, I am running into some issues of not having all of the fields filled in since some of them are not being shown. It is giving me this error when running locally: Notice: Undefined index: company in /Web Directory/ur/process.php on line 14 Notice: Undefined index: workphone in /Web Directory/ur/process.php on line 14 1 record added Please refer to the following code from "step2.php" and "process.php". Step2.php: <?php $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; } ?> <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> </form> process.php <?php // 1. Create a database connection $connection = mysql_connect("x", "x", "x"); if (!$connection) { die("Database connection failed: " . mysql_error()); } // 2. Select a database to use $db_select = mysql_select_db('ur', $connection); mysql_query("INSERT INTO personal (name, cellphone) VALUES ('$_POST[name]', '$_POST[cellphone]')"); mysql_query("INSERT INTO work (company, workphone) VALUES ('$_POST[company]', '$_POST[workphone]')"); mysql_query("INSERT INTO message (message) VALUES ('$_POST[message]')"); echo "1 record added"; mysql_close($connection) ?> http://www.drychalk.com/_/ur/step1.html Thank you once again.
  24. When a user visits my page, I would like them to have 2 choices in the form of radio buttons: 1) Personal Information 2) Work Information http://www.drychalk.com/_/step1.html In the next step, depending on the choice they made in the previous step, I would like to ask them for the information. However, regardless of whichever choice they select, I always want to ask them for the "Other Information", please take a look: http://www.drychalk.com/_/step2.html My question is that how do I use PHP to display the appropriate form fields and hide the others so that I am asking them only about the choice they made in the previous step (and for the "Other Information"). Do I embed all of the form in step2.html in a php file that I use for the "action" attribute in the form of step1.html? or should I do something else... Ultimately I would like to save the information submitted by the user in a MySQL database. http://www.drychalk.com/_/step2.html It would be very much appreciated is someone could provide a working example of this, but as always, just your advice is also much appreciated!!! =)
×
×
  • 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.