vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   I'm trying to create a form... (https://vborg.vbsupport.ru/showthread.php?t=110756)

King Kovifor 03-18-2006 07:29 PM

I'm trying to create a form...
 
OK I'm trying to create a form that'll create a php code section in a specified php file... but I get
Quote:

Parse error: syntax error, unexpected T_CHARACTER, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jeremy/public_html/kkgraphics/write_img_info.php on line 3
when I click submit... can someone please look at my code and see if I've got any mistakes:

FORM (new_image_form.html):

HTML Code:

<form name="add_img_info" method="post" action="write_img_info.php">
  <table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr>
                <td align="left" valing="top">
                        <strong>Image ID (please add one to the last image id):</strong>
                </td>
                <td align="left">
                        <input name="img_id" type="text" value="Image ID" />
        <tr>
                <td align="left" valign="top">
                        <strong>Image Url:</strong>
                </td>
                <td align="left">
                        <input name="img_url" type="text" value="Image URL" />
                </td>
        </tr>
        <tr>
                <td align="left" valign="top">
                        <strong>Image Alt:</strong>
                </td>
                <td align="left">
                        <input name="img_alt" type="text" value="Image Alt" />
                </td>
        </tr>
        <tr>
                <td align="left" valign="top">
                        <strong>Image Name:</strong>
                </td>
                <td align="left">
                        <input name="img_name" type="text" value="Image Name" />
                </td>
        </tr>
        <tr>
                <td align="left" valign="top">
                        <strong>Image Height:</strong>
                </td>
                <td align="left">
                        <input name="img_height" type="text" value="Image Height" />
                </td>
        </tr>
        <tr>
                <td align="left" valign="top">
                        <strong>Image Width:</strong>
                </td>
                <td align="left">
                        <input name="img_width" type="text" value="Image Width" />
                </td>
        </tr>
        <tr>
                <td align="left" valign="top">
                        <strong>Image Category:</strong>
                </td>
                <td align="left">
                        <input name="img_category" type="text" value="Image Category" />
                </td>
        </tr>
        <tr>
                <td align="left" valign="top">
                        <strong>Image Release Date:</strong>
                </td>
                <td align="left">
                        <input name="img_release" type="text" value="Image Release Date" />
                </td>
        </tr>
        <tr>
                <td align="left" valign="top">
                        <strong>Downloadable For Personal Use?</strong>
                </td>
                <td align="left">
                        <input name="img_download" type="text" value="Yes or No?" />
                </td>
        </tr>
        <tr>
                <td align="left" valign="top">
                        <strong>Image Version:</strong>
                </td>
                <td align="left">
                        <input name="img_version" type="text" value="Image Version" />
                </td>
        </tr>
    <tr>
      <td align="center" valign="middle" colspan="2">
        <br /><input type="submit" name="add_img_info" value="Submit!" />
      </td>
    </tr>
</table>
</form>

write_img_info.php (PHP Script to write php code!):

PHP Code:

<?php 
$content 
"<?php/n
//############################{ .
$_POST[\"img_name\"]. }###########################/n
if (
$_REQUEST['id'] == '.$_POST[\"img_id\"].')
/n{
/n
$img_url=\".$_POST[\"img_url\"].\"
/n
$alt=\".$_POST[\"img_alt\"].\"
/n
$name=\".$_POST[\"img_name\"].\"
/n
$height=\".$_POST[\"img_height\"].\"
/n
$width=\".$_POST[\"img_width\"].\"
/n
$category=\".$_POST[\"img_category\"].\"
/n
$release=\".$_POST[\"img_release\"].\"
/n
$download=\".$_POST[\"img_download\"].\"
/n
$version=\".$_POST[\"img_version\"].\"
/n}
/n?>"
;
$fp fopen("image_info.php","wb"); 
fwrite($fp,$content); 
fclose($fp); 
?>



All times are GMT. The time now is 06:09 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02256 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete