-
Posts
111 -
Joined
-
Last visited
Never
About Branden Wagner
- Birthday 03/12/1988
Contact Methods
-
MSN
branden@xcgdesign.com
-
Website URL
http://www.pureintellect.com
Profile Information
-
Gender
Male
Branden Wagner's Achievements
Member (2/5)
0
Reputation
-
[SOLVED] variable variable problem. Whats wrong?
Branden Wagner replied to Branden Wagner's topic in PHP Coding Help
Well, on the webpage, there is a drop down box How Many School are you going to put information for: [Dropdown] {Javascript shows multiline text boxes for each school based on the above dropdown} so then how would i process that using php in an array? -
[SOLVED] variable variable problem. Whats wrong?
Branden Wagner replied to Branden Wagner's topic in PHP Coding Help
Sorry, i guess i should have put that in the first post.. when the loop is done it should have variables like $school_1_tmp $school_1 $school_2_tmp $school_2 ... based on the variable $school_num they sey earlier on in the form(usually ranges between 1 and 5). Basically i was trying to create a loop to iterate through the users input, to collect information on the schools they input. i didnt know how to put the 2 lines on into 1 thus why i used school_1_tmp and school_1... so if its a better idea to combine them, that works for me too. right now i get syntax errors... Unexpected T-variable. -
for($i = 1; $i == $school_num; $i++) { ${school_$i_tmp} = strip_tags(strip_mq_gpc($_POST['school_${i}'])); ${"school_$i} = preg_replace('/\r?\n/', '<br>', ${school_$i_tmp}); } whats wrong with this? how can i fix it? thanks
-
[SOLVED] how do i write this simple code?
Branden Wagner replied to mybluehair's topic in PHP Coding Help
what error did you get? it should be... $name = mysql_result($result,'1','chatroomname'); you have to have a number... as the row.. so whether its result 1,2,3 you have to use 1,2,3 -
[SOLVED] insert character specified number of times
Branden Wagner replied to brendan6's topic in PHP Coding Help
Im pretty sure there isnt one.. but you can do one pretty quick check http://us2.php.net/strings to see if you got it. function repeat($string,$number) { $output= ''; for($i=0;$i==$number; $i++) { $output .= $string; } return $output } -
oooh ok. ^ is not a wildcard character. (sorry i mis understood what you wanted) what you want is regex(Regular Expressions) to fix this. dont quote my regex cuz it sucks... http://us2.php.net/manual/en/function.preg-match.php if(preg_match('English[a-zA-Z0-9]+', $Education1) && .....
-
that code works for me... try making some very basic pages... (no login script). page1 <? session_start(); $_SESSION['username'] = "MyName"; echo "Hello! ". $_SESSION['username']."<br />"; ?> <a href="page2.php">Click here to continue</a> page2 <? session_start(); echo "Hello ". $_SESSION['username']. echo "You made it to page 2"; ?> that code SHOULD work. if it doesnt... then there is a problem with your server/php/apache...something. if it does work.. then we know its one of the other pages.. something typed wrong. try on studenthome.php putting in at the bottom print_r($_SESSION); see what happens
-
What do you mean as far as Wildcar? basically you have $Education1 $Education2 $Education3 $Education4 and you want to check to see if any ALL of them not-equal??? English^ or do you want to see if ANY of them not-equal English^ if you want to check to see if ANY of them do..then use || instead of && is that what you were trying to do? or did i misunderstand
-
how do you plan on doing it without scrolling? if there is too much information for the box/frame/iframe/page/browser... it will scroll. what kind of information.. or rather is it 10 quick little facts or is it sentences of description? the only way to prevent it from scrolling would be CSS... but i dont know exactly what that would be. just google CSS no scroll
-
obviously you didnt read: http://us.php.net/manual/en/function.setcookie.php 3600 is 1 hour in seconds... so your answer is time()+ {1 week in seconds}
-
theres the problem... session_start() has to be put at the top.. or BEFORE anything gets output to the browser meaning... there can NOT be ANY html or blank lines before the session_start. also its supposed to be $_SESSION not $SESSION.. see the difference? soo..... <? session_start(); ?> <html> <head> <title>Gibson Partners -- Student Center</title> <link rel="stylesheet" type="text/css" href="css.css" /> </head> <body> <div id="top"> <?php include("leftnav.php"); ?> <div id="main"> <table width="90%"><tr><td> Hello <?php if(!isset($_SESSION["sessionname"])){ echo "You must be ogged in to do this!"; }else{ echo "Welcome ".$_SESSION["sessionname"]; echo "YAY IT WORKED!!!"; echo "<a href="logout.php">Logout</a>"; } ?> </td></tr></table> <div id="right"> <?php include("right_border.php"); ?> </div> </div> </div> </body> </html> try that and see if that works for you
-
this link has some examples that might help you http://us.php.net/manual/en/function.mail.php Who are you hosting with? Because i ahve found some hosts, will prevent you from using the mail() function. i would also do it like this (for easier reading) $to = "someone@example.com"; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "someonelse@example.com"; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Sent."; but all you really need are just the first 3 parameters mail(to,subject,message). to my knowledge there arent any additional features to validate if it was sent
-
can you put the code to BOTH pages?
-
it should be just example.com not http://www.example.com
-
is the selected area, a picture? is it always the same picture? is the selected area a color pallete? you want to look into both of these imagemagick GD Library One of those will be able to do it. If you have code, I can help you write it, but i wont write it for you.