Jump to content

shoopaie

Member
  • Posts

    24
  • Joined

  • Last visited

Posts posted by shoopaie

  1. This is for all the pro's out there :D

     

    I need a way to create a dropdown box, which i know how to do, but then depending of which value is selected, I need it to display a different "add to cart" button.

     

    For example, I need a dropdown called "Language" which has values such as "Spanish" "Italian" and "French".

     

    Once a user chooses a language, I need the correct "add to cart" button to display.

     

    I don't want 11 different "add to cart" buttons, each giving the user the ability to buy the video in their own language, so i'm needing something clean.

     

    Any ideas? Is this a php topic, or does this require javascript or something? Thanks so much.

  2. To make this as basic and understandable as I can, how do i take a handful of variables (created FROM a form) and send them to another file that has collected other variables from a second form, so that I can email them all at the same time, instead of two different emails.

     

    So basically is i have $fn, $ln, $phone, $email, stored from one form, and $ftp_un, $ftp_pw, etc from another form, how do i collect them all into one file to be processed? Thanks for the help.

     

    I am thinking in my head there should be a way to take the variables from form1.html, and form2.html, and have them all processed in form_process.php, then on to be emailed.

     

    I remember studying some "constants" and "global variables" but nothing that is ringing a bell. Is constants, or global variables, or custom functions accessible to a file that isn't their source file? I cannot include the file or else i include alot of extra fluff...

  3. I was wondering if anything has encountered this issue in IE9, which also seems to be there with IE8. I am trying to insert an image to replace default input text boxes. In opera, firefox, etc, the white background behind the transparent .png images do not show, however in IE they do. Here is my css code for these input boxes.

    The first pic is of IE buggy, and the second picture is firefox displaying it correctly.

     

    IEissue.JPG

    firefox.JPG

     

     

     

    input {
    
    background:url('images/whitebutton.png');
    height:30px;
    padding-left:12px;
    background-repeat:no-repeat;
    margin-right: 0px;
    float:right;
    outline: 0;
    border:none;
    background-color:none;
    
    }

     

     

    My standard HTML code:

     

    <form action="registerSubmit.php" method="post" />
    Name:        <input type="text" name="name" /><br>
    Username: <input type="text" name="username" /><br>
    Email:         <input type="text" name="email" /><br>
    Password: <input type="password" name="pass1" /><br>
    Password (again): <input type="password" name="pass2" /><br>
    <input id="submit" type="submit" name="submit"  value="Register!"/>
    <input type="hidden" name="registerSubmit" />
    </form>

     

    So if anyone knows how to get the white background gone, and the inputs to lineup correctly instead of being offset in IE, that would be cool. And, if someone knows a good website that shows fixes to known IE bugs, that would be great too, thank you!!!

     

    Adam.

  4. I found the answer to the problem, though easily overlooked. The original script had a line in the mysql_query that looked like this:

     

    $check_info = @mysql_query("SELECT * FROM `clayton` WHERE `username` = '$user'");

     

    My code looked like this:

     

    $check_info = @mysql_query("SELECT * FROM 'clayton' WHERE 'username' = '$user'");

     

    Apparently there is a HUGE difference between an apostrophe and a grave accent (the little dude on the tilde key, under the ESC key) that surrounds the words "clayton" and "username" lol...who knew.

  5. I am attempting to retrieve information from the database to compare against information given in a login form. However, I know the information is in the database, and is correct. I also know I am typing it in correctly. Username and password are getting an "Invalid Login" response, when I know they are correct. From this snippet of code, is there anything wrong??? Thank you.

     

     

    //validate the info given
    $user = mysql_real_escape_string($_POST['username']);
    $pass = mysql_real_escape_string($_POST['password']);
    
    //check the database
    $check_info = @mysql_query("SELECT * FROM 'clayton' WHERE 'username' = '$user'");
    $user_info = @mysql_fetch_assoc($check_info);
    
    if($user == $user_info['username'] && $pass == $user_info['password'])
    {
    	echo "Successful Login!";
    }
    else{
    	echo "Invalid Login";
    }

  6. Hello everyone,

    I have been learning about the "mysql_query" business, and from a file i downloaded to reference, I see that the developer has placed periods before and after his/her variables inside the INSERT INTO statement. Any reason why? And, is that required??? Thank you!

     

     

    here is what the file had:

     

    mysql_query("INSERT INTO `people` SET `username` = '".$username."',

    `password` = '".$password."', `email` = '".$email."', `fullname` = '".$fullname."'");

  7. Hey everyone, I host a website video tutorial site for a classified software company. Here is my issue. I have made some mp4's that are over 200 mb in size. I am using a 3rd party delivery script that encrypts some folders, and delivers a download link via email to the person who purchased the video. For some reason, when using this software the video only downloads about 30's or 40's (mb) of the 200+mb file.

     

    However, when i use a direct link to the designated folder, it downloads completely! I have no clue why this is. Any suggestions? Or and hints on how I can keep others from sharing my download links? Thank you!!!

  8. Hey everyone, this topic is concerning the website Clinton4Sale

     

    On this website i have a simple orange header bar at the very top. It is supposed to stretch accross the top of the browser. All browsers (firefox, chrome, safari, and opera) display this correctly, however IE9 does not. Since most of you have that handy little tool that let's you see the html and css i didn't bother pasting the code. If someone has some free time and can tell me what i am missing, i would be very grateful.

     

    Thanks so much,

    Adam.

  9. Can anyone tell me why when a value is submitted to these fields, the error array still populates and then is echoes? Is there an issue in this code?

     

    if(isset($_REQUEST['submitted'])){
    
    if(empty($_POST['first_name'])){
    	$errors[] = "You forgot to enter your first name";	
    }else{
    	$fn = trim($_POST['first_name']);	
    }//end of check on first_name
    
    if(empty($_POST['last_name'])){
    	$errors[] = "You forgot to enter your last name";
    }else{
    	$ln = trim($_POST['last_name']);
    }//end check for last_name
    
    if(empty($_POST['phone'])){
    	$errors[] = "Please enter a valid phone number XXX-XXX-XXXX";
    }else{
    	$phone = trim($_POST['phone']);
    }//end check for numeric phone number
    
    if(empty($_POST['ftp_username'])){
    	$errors[] = "Please go back and enter an FTP username";
    }else{
    	$ftpun = trim($_POST['ftp_username']);
    }
    
    if(empty($errors)){
    	if($_POST["service"] == "storage"){
    
    			echo '<div id="ftp_questions">
    		<form action="" method="" />
    			Name of Subfolder:<br />
    				slayersservices.com/<input type="text" size="10" name="subfolder" /><br /><br />
    			<b>If you need database access:</b><br /><br />
    				Username:<br /><input type="text" name="database_username" maxlength="30" /><br />
    				Password:<br /><input type="password" name="db_pass1" maxlength="30" /><br />
    				Confirm Password:<br /><input type="password" name="db_pass2" maxlength="30" /><br /><br />
    
    			<b>Desired Subdomain</b><br />
    				<input type="text" size="10" name="subfolder" />.slayersservices.com 
    
    		</form>
    		</div>';
    	}//end if statement to check if input is storage intended
    
    }else{
    	foreach($errors as $msg){
    	echo "- $msg<br />";
    	}
    
    }
    
    
    
    
    }else{
    
    echo "it is not submitted";
    }//end of main if to see if submitted has taken place
    

     

     

    I understand the code is weak, and probably messy, i'm just trying to jump in head-first. Thanks for the look.

  10. Can anyone tell me why when a value is submitted to these fields, the error array still populates and then is echoes? Is there an issue in this code?

     

    if(isset($_REQUEST['submitted'])){
    
    if(empty($_POST['first_name'])){
    	$errors[] = "You forgot to enter your first name";	
    }else{
    	$fn = trim($_POST['first_name']);	
    }//end of check on first_name
    
    if(empty($_POST['last_name'])){
    	$errors[] = "You forgot to enter your last name";
    }else{
    	$ln = trim($_POST['last_name']);
    }//end check for last_name
    
    if(empty($_POST['phone'])){
    	$errors[] = "Please enter a valid phone number XXX-XXX-XXXX";
    }else{
    	$phone = trim($_POST['phone']);
    }//end check for numeric phone number
    
    if(empty($_POST['ftp_username'])){
    	$errors[] = "Please go back and enter an FTP username";
    }else{
    	$ftpun = trim($_POST['ftp_username']);
    }
    
    if(empty($errors)){
    	if($_POST["service"] == "storage"){
    
    			echo '<div id="ftp_questions">
    		<form action="" method="" />
    			Name of Subfolder:<br />
    				slayersservices.com/<input type="text" size="10" name="subfolder" /><br /><br />
    			<b>If you need database access:</b><br /><br />
    				Username:<br /><input type="text" name="database_username" maxlength="30" /><br />
    				Password:<br /><input type="password" name="db_pass1" maxlength="30" /><br />
    				Confirm Password:<br /><input type="password" name="db_pass2" maxlength="30" /><br /><br />
    
    			<b>Desired Subdomain</b><br />
    				<input type="text" size="10" name="subfolder" />.slayersservices.com 
    
    		</form>
    		</div>';
    	}//end if statement to check if input is storage intended
    
    }else{
    	foreach($errors as $msg){
    	echo "- $msg<br />";
    	}
    
    }
    
    
    
    
    }else{
    
    echo "it is not submitted";
    }//end of main if to see if submitted has taken place
    

     

     

    I understand the code is weak, and probably messy, i'm just trying to jump in head-first. Thanks for the look.

  11. I have picked up a php book to supplement my videos. The copyright date is 2008. In this book, the author apparently enjoys using tables. Did css pretty much do away with tables, or are they still being used like they might have been in 2008??

  12. I have been following along with the video on using photoshop to create a website. I am trying to take what is being taught and apply it to my own design. problem is I'm still such a novice I am still trying to figure out div tags vs h1 etc

     

    For example I have placed my logo at the top... underneath it I want my main nav bar to appear. In the style_css rule box that I created I called it #upper menu and then defined the font, color and size.

    Is this the proper way to do this?

    I cannot figure out how to put more spaces between the words.... so instead of it looking like this, with one space between each word such as

     

    home cities blog subscribe I want it to look like:

    home cities blog subscribe

    I have tried to increase the word spacing in my css rule but no change. How can I do this?

     

    My next step is to create another different side bar, which I would call #sidemenu and then follow the same steps is this okay?

    Finally, the color and font type is not showing up when I preview in Safari..... can you think of why, here is my code thus far

    <link href="style_css" rel="stylesheet" type="text/css" />

    </head>

     

    <body>

    <div id="wrapper">

     

    <div id="header"></div>

     

    <div id="uppermenu"> home cities blog subscribe </div>

     

     

    Thanks!

     

     

    I am also new to this but i'm pretty sure you have to have a file extension of ".css" not "_css" for your css file. (style.css)

     

    Additionally you might check out http://www.w3schools.com/css/pr_text_word-spacing.asp for a good reference on "word spacing."

  13. Got it.

     

    When you upload the file, I would save the path to the file in the database. Then, when you want to use the image again, you pull the path from the database. Make sense?

     

    For example, say the path to the file is "http://www.yourdomain.com/uploads/image.jpg" after you upload it. You would save that path into the database using a MySQL insert statement. When you want to display it, you would do something like this:

     

    // get path from database using MySQL select, assign it to the $path variable

    echo '<img src="'.$path.'" alt="alt attribute" />';

     

     

    Thanks so much, I will definitely give that a try. Sounds like a great idea to me.

  14. Sorry, let me clarify.

     

    If i had it to where users could upload images to be used at another time. For instance, if i had them upload a logo to be used in a coupon template. How does php call that image to be used dynamically in different coupon templates? Hope that makes it a little more clear.

  15. Hey everyone,

     

    I have exhausted all my knowledge and still cannot understand why some of the text on my page has huge gaps in them. It really make the page look ugly. I attempted the css controls of "word-spacing" and didn't see a change. I am a beginner by far. Would like to see if anyone might have an idea what i am missing here.

     

    http://www.geodesictutorials.com

     

    The bottom right box that has a picture, also has some text, of which you can see the gaps.

    Thanks so much.

×
×
  • Create New...