-
Posts
827 -
Joined
-
Last visited
-
Days Won
9
Everything posted by fastsol
-
We need to see how you are building the $company_array
-
One main thing you are missing is the enctype attribute for the form tag. Check out this tutorial series to get you going in the correct direction. http://www.youtube.com/playlist?list=PL10C2E583722F66E7
-
You need to send the $row array into the function to be able to access the array in the function. Change the lines in your code to these. function listCompany($row) function listContact($row) echo "<tr><td>"; listCompany($row); } // This is the end of the Company info listContact($row); } echo "</td></tr>";
-
foreach($_SESSION['output'] as $out) { echo $out; }
-
It's cause you are reassigning the value of the output with every loop. $_SESSION['output'][] = $outputs; // Need the [] so that it adds a new array element rather than over-writing the previous output. Then you would need to either call a specific array key or use a foreach loop on the $_SESSION['output'] to echo out the outputs.
-
Or you could use single quotes and not have to deal with excaping. echo '<td><input name="excision_type" type="text" value="' . $excision_type . '"></td>';
-
change from submit to image type stops post working.
fastsol replied to Lawlssbatmbl's topic in PHP Coding Help
Post your processing php for the form. -
Did you even try what I posted, I have a line break after each row so they are all on new lines. You will need to be a bit more specific as to how you want it formatted than simply saying you want it on a new row, cause that is what I gave you. Do you want it in a new table row or simply a new line on the screen, what?
-
$query = mysql_query("SELECT * FROM sport"); while($row = mysql_fetch_array($query)) { echo $row['sport_ime'].' '.$row['sezona'].'<br>'; }
-
Use this link, it's what I have and it works great.
-
You could also use ctype_alpha() for only alphabet characters.
-
You can use Notepad or even better Notepad++ to write the code and install WAMP to run the code in the browser from your local machine.
-
My bad, i swear i read it as value instead of name, no other comments from me at this point.
-
You need to give the submit button a name="submit" attribute. A big issue is that you are only connecting to the db if the $_POST['submit'] isset which it isn't cause you haven't given it a name, hence why the query fails too.
-
Here is a reference on what should be used in the headers for file download. http://amecms.com/article/PHP-Force-File-Download-With-File-Whitelist
-
Seriously, no one can help you if you don't put in some effort to try and clarify what exactly you are trying to achieve and what the issue is. Posting the form code with no explanation of what you need it to do will not help us help you. I can only assume that you are wanting people to put a link or something in to the textarea for the video embed code and then convert that into a thumbnail somehow. EXPLAIN IN DETAIL what you are wanting to do and maybe an example of it would be helpful too.
-
I have a ready to go contact form that I distribute. It doesn't have phone number capture but you could easily add that. http://amecms.com/article/Easy-to-use-contact-form-with-validation
-
Sorry but that doesn't clarify your issue at all. What is "posted embeded code"? Do you mean from a form using a file select input? Your terminology is not correct so we don't know what you are trying to do.
-
Looks like you're missing a / in the path where you define the var $the_file on the download page.
-
If that is the case it's probably the restrictions on the 3owl server that is the problem.
-
This block of code is what is determining what to show, so put this on whatever page you want the same logic, although putting it in a separate file and including it would be the best. if ($username && $userid) { echo "You are already logged in as <b>$username</b>"; echo "<br/>Not " . $username . "? <a href='logout.php'>Logout</a>"; } else { $form = "<form action='login.php' method='post'> <table> <tr> <td>Username:</td> <td><input type='text' name='user'/></td> </tr> <tr> <td>Password:</td> <td><input type='password' name='password'/></td> </tr> <tr> <td></td> <td><input type='submit' name='loginbtn' value='Login'/></td> </tr> <tr> <td><a href='register.php'>Register</a></td> <td><a href='forgotpass.php'>Forgot Password?</a></td> </tr> </table> </form>"; } Now you also need to have this bit of code present on the page before the other code for it to work. session_start(); error_reporting(E_ALL^ E_NOTICE); $username = $_SESSION['username']; $userid = $_SESSION['userid']; Notice I also changed the session_start() like I posted before.
-
Here is a good tutorial series to get you started. http://www.youtube.com/playlist?list=PL10C2E583722F66E7
-
What exactly is the issue you have? You have the basic concept of what to do using a if, else block. Are you getting errors? Your session_start() should be above the error_reporting() also or you'll get a header warning when ever a error is thrown from something else on the page.
-
Essentially yes I guess. The thing I do so that no matter where you include from it will always look from the root is make a defined var named ROOT that has a value from the getcwd() and then prepend that to the path for the included file. define('ROOT', getcwd()); include(ROOT.'path/to/file'); You can echo out the getcwd() to see what it provides for your site, but it should always point to the absolute root of the server.